0.0.6 • Published 12 years ago

wd-unit v0.0.6

Weekly downloads
25
License
-
Repository
github
Last release
12 years ago

wd-unit

Drive in-browser tests with WD.js.

Make sure you are running the latest node version

http://nodejs.org/#download

Install

npm install wd-unit

Authors

License

Running a test!

Start by importing the required library.

var launcher = require('wd-unit');

Then you can go ahead and launch your test by running the launcher

launcher.run({
    runner: 'qunit',
    page: 'testpage.html',
    root: process.argv[1].slice(0, process.argv[1].lastIndexOf('/')),
});

Possible options are :

  • runner: Unit testing framework.
  • desired: Desired capabilities for the browser running the test.
    • Default: {browserName: 'firefox'}
  • addr: Base url with wich WD.js will work.
    • Default: 'localhost'
  • page: Test are run from this page.
    • Default: Document root.
  • root: Document root for the webserver.
    • Default: '.'
  • wd_args: Arguments to be passes to WD.js. Check out WD.js docs for more info.
    • Default: {}

Local vs. Distant content

  • Your unit test can be hosted on a distant webserver, in which case wd-unit will work with the webserver.
  • You can also work on loacl non hosted files, in this case wd-unit will run a very lightweight webserver which wd-unit will use to run tests. This webserver uses the root argument for finding content.

Currently supported frameworks

Take a look at our examples

Want more frameworks ?

Check out the wiki about writting plugins.

0.0.6

12 years ago

0.0.5

12 years ago

0.0.4

12 years ago

0.0.3

12 years ago

0.0.2

12 years ago

0.0.1

12 years ago