Skip to content

Commit 19376c1

Browse files
rafalpcpojer
authored andcommitted
Update Configuration.md (#5287)
* Update Configuration.md * Update Configuration.md
1 parent 2dd69b9 commit 19376c1

File tree

1 file changed

+4
-2
lines changed

1 file changed

+4
-2
lines changed

docs/Configuration.md

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -295,7 +295,9 @@ For example, the following would create a global `__DEV__` variable set to
295295

296296
Note that, if you specify a global reference value (like an object or array)
297297
here, and some code mutates that value in the midst of running a test, that
298-
mutation will _not_ be persisted across test runs for other test files.
298+
mutation will _not_ be persisted across test runs for other test files. In
299+
addition the `globals` object must be json-seriazable, so it can't be used
300+
to specify global functions. For that you should use `setupFiles`.
299301

300302
### `globalSetup` [string]
301303

@@ -330,7 +332,7 @@ Both inline source maps and source maps returned directly from a transformer are
330332
supported. Source map URLs are not supported because Jest may not be able to
331333
locate them. To return source maps from a transformer, the `process` function
332334
can return an object like the following. The `map` property may either be the
333-
source map object, or the source map object as a JSON string.
335+
source map object, or the source map object as a string.
334336

335337
```js
336338
return {

0 commit comments

Comments
 (0)