Skip to content

Commit 50b1b85

Browse files
[ci-app] add clarification comments
1 parent 022f0a5 commit 50b1b85

File tree

1 file changed

+8
-0
lines changed

1 file changed

+8
-0
lines changed

content/en/continuous_integration/setup_tests/javascript.md

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -54,6 +54,12 @@ For more information, see the [JavaScript tracer installation docs][4].
5454
yarn add --dev jest-circus
5555
{{< /code-block >}}
5656

57+
58+
**Important**: The installed version of `jest-circus` and `jest` must be the same. For example, if you're using `jest@25.5.4`, run:
59+
{{< code-block lang="bash" >}}
60+
yarn add --dev jest-circus@25.5.4
61+
{{< /code-block >}}
62+
5763
2. Configure a custom [testEnvironment][5] and [testRunner][6] in your `jest.config.js` or however you are configuring [jest][7]:
5864

5965
{{< code-block lang="javascript" filename="jest.config.js" >}}
@@ -76,6 +82,8 @@ require('dd-trace').init({
7682
module.exports = require('jest-environment-node')
7783
{{< /code-block >}}
7884

85+
**Important**: `jest-environment-node` and `jest-environment-jsdom` are installed together with `jest`, so they do not normally appear in your `package.json`. If you've extracted any of these libraries in your `package.json`, make sure the installed version is the same as the one of `jest`.
86+
7987
**Note**: The default configuration should work for most cases, but depending on the volume and speed of your tests, the tracer or the Agent might drop some of the spans. Alleviate this by increasing the `flushInterval` (a value in milliseconds) when initializing the tracer:
8088

8189
{{< code-block lang="javascript" >}}

0 commit comments

Comments
 (0)