0.2.3 • Published 7 years ago
atom-test-runner-jest v0.2.3
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-devUsage
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 .