atom-test-runner-jest

0.2.3 • Public • Published

atom-test-runner-jest

Use Jest to bring Delightful JavaScript Testing to your Atom packages.

Installation

npm install atom-test-runner-jest jest-preset-atom --save-dev

Usage

Add the following to your package.json:

{
  "name": "my-package",
  "atomTestRunner": "atom-test-runner-jest",
  "jest": {
    "preset": "jest-preset-atom"
  }
}

Write your unit tests in /spec/:

describe("My Delightful Package", () => {
  it("knows about all of Atom's loaded packages", () => {
    const packages = atom.packages.getLoadedPackages();
    expect(packages).toMatchSnapshot();
  })
})

To run your tests run the following in your shell:

atom --test .

Readme

Keywords

Package Sidebar

Install

npm i atom-test-runner-jest

Weekly Downloads

1

Version

0.2.3

License

ISC

Unpacked Size

2.61 kB

Total Files

4

Last publish

Collaborators

  • keplersj