# expectations

> jasmine-style 'expect' calls for mocha and other test frameworks

Latest version **1.0.0** (published 2019-02-23) · 0BSD license · 0 weekly downloads

## Install

```sh
npm install expectations
pnpm add expectations
yarn add expectations
bun add expectations
```

## Health

**Score 23/100 (F)** — status: abandoned.

Positive: has types package; no vulnerabilities; high quality score.

Warnings: low downloads; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.0 |
| Published | 2019-02-23 |
| First published | 2012-06-30 |
| Weekly downloads | 0 |
| License | 0BSD |
| TypeScript types | separate (@types/expectations) |
| Module format | CommonJS |
| Node | >=8.0 |
| Dependencies | 0 |
| Unpacked size | 53.5 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 30 |
| Author | Steve Mason |
| Maintainers | spmason |
| Keywords | expect, mocha, jasmine, assertion |

## Links

- npm: https://www.npmjs.com/package/expectations
- Repository: https://github.com/spmason/expectations
- Homepage: https://github.com/spmason/expectations#readme
- Issues: https://github.com/spmason/expectations/issues
- npm.io page: https://npm.io/package/expectations

## Alternatives

- [duck](https://npm.io/package/duck.md) — 4.2M weekly downloads
- [ava](https://npm.io/package/ava.md) — 560.2K weekly downloads
- [storybook-addon-module-mock](https://npm.io/package/storybook-addon-module-mock.md) — 71.7K weekly downloads
- [@ethereum-waffle/mock-contract](https://npm.io/package/@ethereum-waffle/mock-contract.md) — 40.0K weekly downloads
- [aws-elasticsearch-connector](https://npm.io/package/aws-elasticsearch-connector.md) — 37.4K weekly downloads

## Recent versions

- 1.0.0 (latest) — 2019-02-23
- 0.7.1 — 2017-01-26
- 0.7.0 — 2017-01-18
- 0.6.0 — 2016-05-03
- 0.5.2 — 2015-10-04
- 0.5.1 — 2015-05-14
- 0.5.0 — 2015-05-14
- 0.4.2 — 2015-03-10
- 0.4.1 — 2015-02-23
- 0.4.0 — 2015-02-21
- 0.3.1 — 2015-02-17
- 0.3.0 — 2014-11-30
- 0.2.5 — 2013-10-15
- 0.2.2 — 2013-10-02
- 0.2.0 — 2013-06-06
- … 1 more at https://npm.io/package/expectations/versions

## README

[![Build Status](https://travis-ci.org/spmason/expectations.svg?branch=master)](https://travis-ci.org/spmason/expectations)

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.

---
_Source: https://npm.io/package/expectations · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
