Skip to content

Commit

Permalink
Fix test debugging instructions for contributors
Browse files Browse the repository at this point in the history
  • Loading branch information
conartist6 committed Apr 23, 2022
1 parent bdc4eb5 commit 60abd38
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 3 deletions.
4 changes: 2 additions & 2 deletions CONTRIBUTING.md
Expand Up @@ -169,10 +169,10 @@ $ TEST_DEBUG=true make test

<details>
<summary>More options</summary>
Or you can directly use Yarn
Or you can directly use `yarn` and `jest`:

```sh
$ yarn node --inspect-brk node_modules/jest/bin/jest.js --runInBand
TEST_DEBUG=true yarn run --inspect-brk jest packages/package-to-test
```
</details>
<br>
Expand Down
6 changes: 5 additions & 1 deletion jest.config.js
Expand Up @@ -7,9 +7,13 @@ const supportsESMAndJestLightRunner = semver.satisfies(
"^12.22 || ^13.7 || >=14.17"
);
const isPublishBundle = process.env.IS_PUBLISH;
const isDebug = process.env.TEST_DEBUG;

module.exports = {
runner: supportsESMAndJestLightRunner ? "jest-light-runner" : "jest-runner",
runner:
supportsESMAndJestLightRunner && !isDebug
? "jest-light-runner"
: "jest-runner",

collectCoverageFrom: [
"packages/*/src/**/*.{js,mjs,ts}",
Expand Down

0 comments on commit 60abd38

Please sign in to comment.