This is a standalone package that supplies jasmine style expect(foo).toEqual(bar);
-style expectations.
Designed for use in mocha, but suitable for use in any test framework.
npm install expectations
bower install expectations
NodeJS:
require('expectations'); // exports a global, so use anywhere
From Mocha (on commandline or add to test/mocha.opts):
--require expectations
In browser:
<script src="https://github.com/spmason/expectations/raw/master/expectations.js"></script>
We aim to support the majority of the jasmine expect
API, but there are likely things missing. Pull Requests (with tests!) graciously accepted.