@rockpack/tester

5.0.0-next.5 • Public • Published

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

Package Sidebar

Install

npm i @rockpack/tester

Weekly Downloads

125

Version

5.0.0-next.5

License

MIT

Unpacked Size

11 kB

Total Files

19

Last publish

Collaborators

  • alexsergey