# jasmine-expect-count

> Make sure all your expects are getting checked

Latest version **1.1.2** (published 2020-12-26) · MIT license · 0 weekly downloads

## Install

```sh
npm install jasmine-expect-count
pnpm add jasmine-expect-count
yarn add jasmine-expect-count
bun add jasmine-expect-count
```

## Health

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

Positive: no vulnerabilities.

Warnings: low downloads; no types; no esm support.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.1.2 |
| Published | 2020-12-26 |
| First published | 2017-09-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | none |
| Module format | CommonJS |
| Dependencies | 0 |
| Unpacked size | 13.3 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 4 |
| Author | Tony Brix |
| Maintainers | tonybrix |
| Keywords | jasmine, expect, count |

## Links

- npm: https://www.npmjs.com/package/jasmine-expect-count
- Repository: https://github.com/UziTech/jasmine-expect-count
- Homepage: https://github.com/UziTech/jasmine-expect-count#readme
- Issues: https://github.com/UziTech/jasmine-expect-count/issues
- npm.io page: https://npm.io/package/jasmine-expect-count

## Recent versions

- 1.1.2 (latest) — 2020-12-26
- 1.1.1 — 2019-04-04
- 1.1.0 — 2018-02-07
- 1.0.0 — 2017-09-11

## README

[![Actions Status](https://github.com/UziTech/jasmine-expect-count/workflows/CI/badge.svg)](https://github.com/UziTech/jasmine-expect-count/actions)

# Jasmine Expect Count

Lets you specify the number of expects expected to be called.

## Installing

Save `jasmine-expect-count` in devDependencies

```sh
npm install jasmine-expect-count --save-dev
```

then require it

```js
require("jasmine-expect-count");
```

before your tests.

## Using

Jasmine Expect Count allows you to specify the number of expects to be called in an `it`.

```js
it("should call expect 3 times", function () {
  jasmine.expectCount(3);

  expect(1).toBe(1);

  const p = new Promise(function (resolve) {
    setTimeout(function () {
      expect(2).toBe(2);
      resolve();
    }, 1);
  });

  expect(3).toBe(3);

  // if returning p is forgotten only 2 expects will be called.
  return p;
});
```

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