Skip to content

Latest commit

 

History

History
67 lines (44 loc) · 1.51 KB

README.md

File metadata and controls

67 lines (44 loc) · 1.51 KB

Rockpack

@rockpack/tester

@rockpack/tester is Jest with cool config, add-ons and fully compatible with TS / Babel.

@rockpack/tester includes several recommended modules and a test report generator.

@rockpack/tester this module is part of the Rockpack project. See more details on the official site.

Reporter:

Using

  1. Installation:
# NPM
npm install @rockpack/tester --save-dev

# YARN
yarn add @rockpack/tester --dev
  1. Make tests.js in the root of project

  2. Put the code in tests.js

const tests = require('@rockpack/tester');

tests();
  1. Run the script
node tests.js

or DEV mode

node tests.js --watch
  1. Create something.spec.js in src folder of the project and write Jest test

Please see "examples" folder - here

Tricks

If you need override testEnvironment configuration from JSDom (React App) to Node, you should:

  1. Create "jest.extend.js" file in the root of the project

  2. Put the code inside:

module.exports = {
  testEnvironment: 'node',
};

The MIT License

MIT