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

Dependencies (14)

Dev Dependencies (2)

Package Sidebar

Install

npm i testmate

Weekly Downloads

1

Version

1.0.2

License

MIT

Last publish

Collaborators

  • gr2m