1.0.1 • Published 7 years ago

atom-jest-test-runner v1.0.1

Weekly downloads
2
License
MIT
Repository
github
Last release
7 years ago

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.

1.0.1

7 years ago

1.0.0

7 years ago