storybook/docs/snippets/common/test-runner-config-serializer.js.mdx
2023-11-22 21:43:27 +00:00

19 lines
408 B
Plaintext

```js
// ./test-runner-jest.config.js
import { getJestConfig } from '@storybook/test-runner';
const defaultConfig = getJestConfig();
const config = {
...defaultConfig,
snapshotSerializers: [
// Sets up the custom serializer to preprocess the HTML before it's passed onto the test-runner
'./snapshot-serializer.js',
...defaultConfig.snapshotSerializers,
],
};
export default config;
```