jest-cli-browser-support

0.4.18 • Public • Published

Jest Build Status

THIS IS A FORK OF JEST

  • Support for browser aliases.
  • Code coverage
  • and it ignores handlebars files! so if you are using hbsfy you won't be screwed

Painless JavaScript Unit Testing

  • Familiar Approach: Built on top of the Jasmine test framework, using familiar expect(value).toBe(other) assertions

  • Mock by Default: Automatically mocks CommonJS modules returned by require(), making most existing code testable

  • Short Feedback Loop: DOM APIs are mocked and tests run in parallel via a small node.js command line utility

Getting Started

Check out the Getting Started tutorial. It's pretty simple!

API

<generated_api_start />

The jest object

Mock functions

Config options

Globally injected variables

  • afterEach(fn)
  • beforeEach(fn)
  • describe(name, fn)
  • it(name, fn)
  • it.only(name, fn) executes only this test. Useful when investigating a failure
  • jest
  • pit(name, fn) helper for promises
  • require(module)
  • require.requireActual(module)
  • xdescribe(name, fn)
  • xit(name, fn)

expect(value)

  • .not inverse the next comparison
  • .toThrow(?message)
  • .toBe(value) comparison using ===
  • .toEqual(value) deep comparison. Use jasmine.any(type) to be softer
  • .toBeFalsy()
  • .toBeTruthy()
  • .toBeNull()
  • .toBeUndefined()
  • .toBeDefined()
  • .toMatch(regexp)
  • .toContain(string)
  • .toBeCloseTo(number, delta)
  • .toBeGreaterThan(number)
  • .toBeLessThan(number)
  • .toBeCalled()
  • .toBeCalledWith(arg, um, ents)
  • .lastCalledWith(arg, um, ents)

<generated_api_end />

Package Sidebar

Install

npm i jest-cli-browser-support

Weekly Downloads

3

Version

0.4.18

License

BSD-3-Clause

Last publish

Collaborators

  • securingsincity