Unable to add @fluentui/jest-serializer-merge-styles as snapshot serializer within storyshot #16249
-
Im trying to have storyshots included within storybook with our fluentUI components. I need to enable snapshotSerializer as a fluent provided serializer but I get the error: Type 'string' is not assignable to type 'Plugin' below. As per storyshot documentation, Im supposed to add it here as it is ignored if added in the jest.config file. Im using:
Here's my setup file:
|
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Based on both the type error and the storyshots plugin documentation, it looks like you need to pass a serializer plugin object (not the name of a serializer plugin) in this context. import * as jestSerializerMergeStyles from '@fluentui/jest-serializer-merge-styles';
// ...
initStoryshots({
snapshotSerializers: [jestSerializerMergeStyles],
// ...
}); |
Beta Was this translation helpful? Give feedback.
Based on both the type error and the storyshots plugin documentation, it looks like you need to pass a serializer plugin object (not the name of a serializer plugin) in this context.