Skip to content

Commit

Permalink
Add reference to <rootDir> in setupTestFrameworkScriptFile docs (#6615)
Browse files Browse the repository at this point in the history
  • Loading branch information
jonathan-soifer authored and SimenB committed Jul 4, 2018
1 parent 266e820 commit 3844b55
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
2 changes: 2 additions & 0 deletions docs/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -612,6 +612,8 @@ Default: `undefined`

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.

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"`.

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.

### `snapshotSerializers` [array<string>]
Expand Down
2 changes: 2 additions & 0 deletions website/versioned_docs/version-23.0/Configuration.md
Original file line number Diff line number Diff line change
Expand Up @@ -601,6 +601,8 @@ Default: `undefined`

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.

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"`.

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.

### `snapshotSerializers` [array<string>]
Expand Down

0 comments on commit 3844b55

Please sign in to comment.