This repository was archived by the owner on Mar 4, 2020. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 53
Testing guide
Alexandru Buliga edited this page Jul 1, 2019
·
7 revisions
yarn test
yarn test:watch
yarn test:watch --testFilePattern=FILE_PATTERN --testNamePattern=NAME_PATTERN
or
yarn test:watch -F FILE_PATTERN -t NAME_PATTERN
Example:
yarn test:watch -F Menu -t "passes arbitrary props"
- Open
Chrome DevTools
and drag & drop the wholereact/
repo directory there, then click allow
- 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*
- Go to
Chrome DevTools
and click on the green button to openDedicated DevTools for Node.js
- Press
Ctrl+P
to navigate to your test files, add breakpoints and resume execution