Skip to content

Commit 4a4d1b3

Browse files
authored
Merge pull request #15947 from DataDog/juan-fernandez/clarification-about-jest
[ci-visibility] Add note about `--passWithNoTests` in `jest` for intelligent test runner
2 parents a323395 + cc8b135 commit 4a4d1b3

File tree

1 file changed

+10
-7
lines changed
  • content/en/continuous_integration/intelligent_test_runner

1 file changed

+10
-7
lines changed

content/en/continuous_integration/intelligent_test_runner/_index.md

+10-7
Original file line numberDiff line numberDiff line change
@@ -79,8 +79,10 @@ After setting these environment variables, run your tests as you normally do:
7979
NODE_OPTIONS="-r dd-trace/ci/init" DD_ENV=ci DD_SERVICE=my-javascript-app DD_CIVISIBILITY_AGENTLESS_ENABLED=true DD_API_KEY=$API_KEY DD_CIVISIBILITY_GIT_UPLOAD_ENABLED=true DD_CIVISIBILITY_ITR_ENABLED=true yarn test
8080
{{< /code-block >}}
8181

82+
**Important**: It is possible for Intelligent Test Runner to skip every test. By default, `jest` fails if there are no tests to run. To prevent `jest` from failing, pass [`--passWithNoTests`][5] to `jest`.
83+
8284
#### UI activation
83-
In addition to setting the environment variables above, you need to activate the Intelligent Test Runner on the [Test Service Settings][5] page.
85+
In addition to setting the environment variables, you or a user in your organization with admin permissions must activate the Intelligent Test Runner on the [Test Service Settings][6] page.
8486

8587
#### Compatibility
8688

@@ -118,7 +120,7 @@ To enable Intelligent Test Runner, the version of the `dd-trace` tool must be >=
118120
**Default**: `false`<br/>
119121
**Note**: Required only during Beta
120122

121-
After setting these environment variables, run your tests as you normally do by using [dotnet test][6] or [VSTest.Console.exe][7]:
123+
After setting these environment variables, run your tests as you normally do by using [dotnet test][7] or [VSTest.Console.exe][8]:
122124

123125
{{< tabs >}}
124126

@@ -144,7 +146,7 @@ dd-trace ci run --dd-service=my-dotnet-app --dd-env=ci -- VSTest.Console.exe {te
144146

145147
#### UI activation
146148

147-
In addition to setting the environment variables above, you need to activate the Intelligent Test Runner on the [Test Service Settings][5] page.
149+
In addition to setting the environment variables, you or a user in your organization with admin permissions must activate the Intelligent Test Runner on the [Test Service Settings][6] page.
148150

149151
### Swift
150152

@@ -172,7 +174,7 @@ The following environment variables must also be set:
172174

173175
#### UI activation
174176

175-
In addition to setting the environment variables above, you need to activate the Intelligent Test Runner on the [Test Service Settings][5] page.
177+
In addition to setting the environment variables, you or a user in your organization with admin permissions must activate the Intelligent Test Runner on the [Test Service Settings][6] page.
176178

177179
## Setup CI Job
178180

@@ -195,6 +197,7 @@ The default branch is automatically excluded from having Intelligent Test Runner
195197
[2]: https://app.datadoghq.com/organization-settings/api-keys
196198
[3]: https://app.datadoghq.com/organization-settings/application-keys
197199
[4]: /getting_started/site/
198-
[5]: https://app.datadoghq.com/ci/settings/test-service
199-
[6]: https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-test
200-
[7]: https://docs.microsoft.com/en-us/visualstudio/test/vstest-console-options
200+
[5]: https://jestjs.io/docs/cli#--passwithnotests
201+
[6]: https://app.datadoghq.com/ci/settings/test-service
202+
[7]: https://docs.microsoft.com/en-us/dotnet/core/tools/dotnet-test
203+
[8]: https://docs.microsoft.com/en-us/visualstudio/test/vstest-console-options

0 commit comments

Comments
 (0)