Skip to content

SleepWalker/atom-jest-test-runner

Repository files navigation

Atom Jest Test Runner

Build Status Build status Dependency Status

This package allows you to use jest to run your atom's extension tests.

Please note, that this package may not satisfy your needs due to some difficulties with integration. Not solved issues:

  • no global atom variable
  • keyboard interaction does not work in watch mode :(
  • on some projects it may fail with TypeError: Cannot redefine property: length error in oniguruma package. There is an issue in jest repository regarding this case.

Installation

$ apm install --save-dev atom-jest-test-runner

Usage

Simply add atomTestRunner field in you package.json:

{
  "name": "hello-world",
  // ...
  "atomTestRunner": "atom-jest-test-runner"
}

then simply run:

$ atom --test test

Watch mode

You can also run tests in watch mode, while developing a package. Because the jest will be executed by separate process, you won't be able to pass cli options directly, so you need to use env variables for that:

$ TEST_MODE='watch' atom --test test

Example

This package uses itself to test itself :D So you can browse current repository to see how it was set up.

About

Run your Atom package tests using jest

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published