From 1ba363fb1d8bc26cb3eebb84fac2cf2138406e5f Mon Sep 17 00:00:00 2001 From: Yann Braga Date: Tue, 31 Oct 2023 14:41:29 +0100 Subject: [PATCH] [skip ci] update snapshot resolver recipe --- README.md | 14 ++++++++++++++ 1 file changed, 14 insertions(+) diff --git a/README.md b/README.md index ddd8687f..9f33951d 100644 --- a/README.md +++ b/README.md @@ -806,6 +806,20 @@ When running with `--stories-json`, tests get generated in a temporary folder an ```js // ./test-runner-jest.config.js +const { getJestConfig } = require('@storybook/test-runner'); + +/** + * @type {import('@jest/types').Config.InitialOptions} + */ +module.exports = { + // The default configuration comes from @storybook/test-runner + ...getJestConfig(), + snapshotResolver: './snapshot-resolver.js', +}; +``` + +```js +// ./snapshot-resolver.js const path = require('path'); module.exports = {