Sign Up for Free

RunKit +

Try any Node.js package right in your browser

This is a playground to test code. It runs a full Node.js environment and already has all of npm’s 400,000 packages pre-installed, including referee with all npm packages installed. Try it out:

var referee = require("referee")

This service is provided by RunKit and is not affiliated with npm, Inc or the package authors.

referee v1.2.0

Assertions for any JavaScript test framework and environment


Build status

referee is in your unit tests, deciding who passes and who fails.

It is a test-framework agnostic assertion and expectation library. Some highlights:

  • Rich library of assertions
  • Symmetric assert/refute (refute is referee's "assert.not*")
  • Evented: Emits success and failure events
  • Failing assertions throw exceptions by default, but can be configured to not
  • API to add custom assertions that provides quite a bit of plumbing for free

Full documentation:

referee works in browsers (including old and rowdy ones, like IE6) and Node. It will define itself as an AMD module if you want it to (i.e. if there's a define function available).


1.2.0 (2015-Nov-16)

  • Updated dependencies #13
  • Added license info in package.json #12
  • A test method on assertions, returning a promise which is resolved, when assertion passes, and rejected when it fails; relies on a Promise global (shimmable) #9

1.1.1 (2014-Dec-12)

1.1.0 (2014-Oct-31)

1.0.3 (2014-Apr-30)

Developers - Running tests


  1. npm install - installs dev dependencies
  2. npm test - runs node tests


  1. npm install - installs dev dependencies
  2. npm start - starts buster server
  3. open url localhost:1111/capture in the browser(s) you want to test with
  4. npm run-script test-browser - runs browser tests
RunKit is a free, in-browser JavaScript dev environment for prototyping Node.js code, with every npm package installed. Sign up to share your code.
Sign Up for Free