diff --git a/README.md b/README.md index 16ac07212e..672be9fe85 100644 --- a/README.md +++ b/README.md @@ -266,6 +266,13 @@ console.log(datamodel.flatState); // {infura: {...}, contractExchangeRates: [... Run `yarn test` to run the tests once. To run tests on file changes, run `yarn test:watch`. +To enable debugger [via Chrome DevTools](https://jestjs.io/docs/troubleshooting#tests-are-failing-and-you-dont-know-why): + +1. run `yarn test:debug` +2. navigate to `chrome://inspect` +3. click "Open Dedicated DevTools for Node". Keep the DevTools window open +4. stop/rerun the tests as needed + Run `yarn lint` to run the linter, or run `yarn lint:fix` to run the linter and fix any automatically fixable issues. ### Linking During Development diff --git a/package.json b/package.json index b2d8bfcd11..0ac0efb0cf 100644 --- a/package.json +++ b/package.json @@ -32,6 +32,7 @@ "prepack": "./scripts/prepack.sh", "setup": "yarn install", "test": "jest", + "test:debug": "yarn run --inspect-brk jest --runInBand", "test:watch": "jest --watch" }, "dependencies": {