mirror of
https://github.com/storybookjs/storybook.git
synced 2025-04-08 11:11:53 +08:00
19 lines
408 B
Plaintext
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;
|
|
```
|