GitXplorerGitXplorer
U

jasmine-expect-count

public
4 stars
0 forks
3 issues

Commits

List of commits on branch master.
Unverified
b73e599bb7051cf087f340ecf9831a96566a3953

chore(deps): update devdependency semantic-release to ^21.0.9

rrenovate[bot] committed a year ago
Unverified
8a02ebe4c5c498aa2cee7e6e18bb658fe9310afc

chore(deps): update semantic-release monorepo

rrenovate[bot] committed a year ago
Unverified
d68c44bebfc410dd86ef55948c4c21dd37a0a47a

chore(deps): update devdependency eslint to ^8.47.0

rrenovate[bot] committed a year ago
Unverified
9d668c5e2487720a6e5c726e2e21e50c59c8ffe8

chore(deps): update semantic-release monorepo

rrenovate[bot] committed a year ago
Unverified
763379c81689e4376f22eaed206c1f9eb1b2da5f

chore(deps): update devdependency eslint to ^8.46.0

rrenovate[bot] committed a year ago
Unverified
8dfad9f3f4f1dda1fa1f4e8b2484283348cf8fa6

chore(deps): update devdependency eslint to ^8.43.0

rrenovate[bot] committed 2 years ago

README

The README file for this repository.

Actions Status

Jasmine Expect Count

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

Installing

Save jasmine-expect-count in devDependencies

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

then require it

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.

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;
});