Skip to content

Commit 3844b55

Browse files
jonathan-soiferSimenB
authored andcommitted
Add reference to <rootDir> in setupTestFrameworkScriptFile docs (jestjs#6615)
1 parent 266e820 commit 3844b55

File tree

2 files changed

+4
-0
lines changed

2 files changed

+4
-0
lines changed

docs/Configuration.md

+2
Original file line numberDiff line numberDiff line change
@@ -612,6 +612,8 @@ Default: `undefined`
612612

613613
The path to a module that runs some code to configure or set up the testing framework before each test. Since [`setupFiles`](#setupfiles-array) executes before the test framework is installed in the environment, this script file presents you the opportunity of running some code immediately after the test framework has been installed in the environment.
614614

615+
If you want this path to be [relative to the root directory of your project](#rootdir-string), please include `<rootDir>` inside the path string, like `"<rootDir>/a-configs-folder"`.
616+
615617
For example, Jest ships with several plug-ins to `jasmine` that work by monkey-patching the jasmine API. If you wanted to add even more jasmine plugins to the mix (or if you wanted some custom, project-wide matchers for example), you could do so in this module.
616618

617619
### `snapshotSerializers` [array<string>]

website/versioned_docs/version-23.0/Configuration.md

+2
Original file line numberDiff line numberDiff line change
@@ -601,6 +601,8 @@ Default: `undefined`
601601

602602
The path to a module that runs some code to configure or set up the testing framework before each test. Since [`setupFiles`](#setupfiles-array) executes before the test framework is installed in the environment, this script file presents you the opportunity of running some code immediately after the test framework has been installed in the environment.
603603

604+
If you want this path to be [relative to the root directory of your project](#rootdir-string), please include `<rootDir>` inside the path string, like `"<rootDir>/a-configs-folder"`.
605+
604606
For example, Jest ships with several plug-ins to `jasmine` that work by monkey-patching the jasmine API. If you wanted to add even more jasmine plugins to the mix (or if you wanted some custom, project-wide matchers for example), you could do so in this module.
605607

606608
### `snapshotSerializers` [array<string>]

0 commit comments

Comments
 (0)