diff --git a/CONTRIBUTING.md b/CONTRIBUTING.md
index 23ab7c7adad5..c6e26bab5d82 100644
--- a/CONTRIBUTING.md
+++ b/CONTRIBUTING.md
@@ -169,10 +169,10 @@ $ TEST_DEBUG=true make test
More options
- 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
```
diff --git a/jest.config.js b/jest.config.js
index 412a8d07ae1d..7cd085bcb8d2 100644
--- a/jest.config.js
+++ b/jest.config.js
@@ -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}",