expectations
DefinitelyTyped icon, indicating that this package has TypeScript declarations provided by the separate @types/expectations package

1.0.0 • Public • Published

Build Status

Jasmine-style expectations for node.js & the browser

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.

Installation

  • NodeJS: npm install expectations
  • Browser: Download manually, or bower install expectations

Usage

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="expectations.js"></script>

API

We aim to support the majority of the jasmine expect API, but there are likely things missing. Pull Requests (with tests!) graciously accepted.

Package Sidebar

Install

npm i expectations

Weekly Downloads

118

Version

1.0.0

License

0BSD

Unpacked Size

54.8 kB

Total Files

14

Last publish

Collaborators

  • spmason