diff --git a/docs/Configuration.md b/docs/Configuration.md index d1edadf3a194..de2479cffd2f 100644 --- a/docs/Configuration.md +++ b/docs/Configuration.md @@ -252,7 +252,7 @@ Default: `[]` A list of paths to snapshot serializer modules Jest should use for snapshot testing. -Jest has default serializers for built-in javascript types and for react +Jest has default serializers for built-in JavaScript types and for React elements. See [snapshot test tutorial](/jest/docs/tutorial-react-native.html#snapshot-test) for more information. Example serializer module: @@ -304,6 +304,8 @@ Pretty foo: Object { } ``` +To make a dependency explicit instead of implicit, you can call [`expect.addSnapshotSerializer`](/jest/docs/expect.html#expectaddsnapshotserializerserializer) to add a module for an individual test file instead of adding its path to `snapshotSerializers` in Jest configuration. + ### `testEnvironment` [string] Default: `"jsdom"` diff --git a/docs/ExpectAPI.md b/docs/ExpectAPI.md index d0f94a19f08a..6b2b955aca30 100644 --- a/docs/ExpectAPI.md +++ b/docs/ExpectAPI.md @@ -257,7 +257,6 @@ If you add a snapshot serializer in individual test files instead of to adding i * You make the dependency explicit instead of implicit. * You avoid limits to configuration that might cause you to eject from [create-react-app](https://github.com/facebookincubator/create-react-app). - See [configuring package.json](/jest/docs/configuration.html#snapshotserializers-array-string) for more information. ### `.not`