Share your code. npm Orgs help your team discover, share, and reuse code. Create a free org »

testmate

1.0.2 • Public • Published

testmate

A humble cross node/browser/saucelabs test runner

Build Status Dependencies Status

Write tests once, run them in

  1. Node
  2. local Browsers using Selenium
  3. remote Browsers / Plattforms using saucelabs.

testmate is very opiniated. It runs tests using

Example

Let's assume this is your test/test-mylib.js

var myLib = require('./my-lib');
describe('myLib', function () {
  it('should pass', function () {
    expect(myLib('foo')).to.be('bar');
  });
});

Then you can run it with different clients

# run in node (default)
testmate --client=node test/test-mylib.js
 
# run in local browser
testmate --client=selenium:firefox test/test-mylib.js
 
# run in any browser/plattform/version using saucelabs
SAUCE_USERNAME="user" SAUCE_ACCESS_KEY="key" testmate client="saucelabs:internet explorer:10:Windows 8" test/test-mylib.js
 
# instead of passing --client, you can also set the TEST_CLIENT env variable

Projects testing with testmate

add yours, send a pull request <3

Credits

The idea and lots of its code is taken from PouchDB's test setup.

License

MIT

install

npm i testmate

Downloadsweekly downloads

4

version

1.0.2

license

MIT

repository

githubgithub

last publish

collaborators

  • avatar