Skip to content
This repository was archived by the owner on Mar 4, 2020. It is now read-only.

Testing guide

Alexandru Buliga edited this page Sep 4, 2018 · 7 revisions

Running tests

# Run tests with:
yarn test

# Run tests in watch mode with:
yarn test:watch

Debugging tests

  1. Open Chrome DevTools and drag & drop the whole react/ repo directory there, then click allow

screen shot 2018-09-03 at 17 19 15

  1. Go to project sources and in config.ts replace cheap-source-map string with eval-source-map

  2. Go to console and run:

node --inspect-brk node_modules/.bin/jest --runInBand [PATTERN_FOR_TEST_FILENAME]

       e.g.:

node --inspect-brk node_modules/.bin/jest --runInBand ChatList*
  1. Go to Chrome DevTools and click on the green button to open Dedicated DevTools for Node.js

screen shot 2018-09-03 at 17 20 20

  1. Press Ctrl+P to navigate to your test files, add breakpoints and resume execution
Clone this wiki locally