@tramvai/test-integration-jest

3.40.28 • Public • Published

Tramvai test integration jest

Jest preset for integration-testing

@tramvai/cli and puppeteer should be installed separately

Installation

npm i --save-dev @tramvai/test-integration-jest

How To

Debug and development of integration tests in Jest

Using this jest preset you can run integration tests in watch mode. In this case, application itself will be launched only once and will work in background.

  1. Add preset @tramvai/test-integration-jest to jest.integration.config.js:

    module.exports = {
      preset: '@tramvai/test-integration-jest',
    };
  2. Add new script for running tests in watch mode to package.json:

    {
      "scripts": {
        "test:integration": "jest -w=3 --config ./jest.integration.config.js",
        "test:integration:watch": "jest --runInBand --watch --config ./jest.integration.config.js"
      }
    }
  3. Run some test with yarn test:integration:watch <path_to_test>. In this case you are able to go to local url http://localhost:3000 and see application at work.

Environment for Jest

Minimal set of dependencies for running jest:

npm i --save-dev jest @types/jest jest-circus

Readme

Keywords

none

Package Sidebar

Install

npm i @tramvai/test-integration-jest

Weekly Downloads

392

Version

3.40.28

License

Apache-2.0

Unpacked Size

15.2 kB

Total Files

27

Last publish

Collaborators

  • meskill
  • super_oleg
  • tinkoffbank