Automate TAP browser unit tests with WebDriver
Easily run TAP-producing JS unit tests in the browser, automated by WebDriver with Node.js. This is a helper module for wd-tap, this module sets up the test page and HTTP server for you.
The browser you are testing must have access to
localhost, either running
locally or through a tunnel.
var runner = require'wd-tap-runner'wd = require'wd'browserify = require'browserify';var myCode = browserifyadd'./test.js'bundlebrowser = wdremote;browserinitrunnersrc browser port: 8000// results is parsed using tap-parserbrowserquit;;;
Runs the tests in the browser. The browser must have access to
either run the browser locally or open a tunnel to the remote browser.
src may be a stream or string of JS code that contains the tests that will
browser is the WebDriver browser (created by
wd) that the tests will be run in.
may contain a
port property which specifies what port the HTTP server will
use (default is 8000).
callback will be called with either an error or the
TAP test results, parsed using
tap-parser. Note that the error will
be null even if some tests failed; the results indicate what tests passed or
TAP results can be written to the browser's console. The test page
automatically displays any output written using