Skip to content

Unable to add @fluentui/jest-serializer-merge-styles as snapshot serializer within storyshot #16249

Answered by ecraig12345
fhdsouza asked this question in Q&A
Discussion options

You must be logged in to vote

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],
  // ...
});

Replies: 1 comment 2 replies

Comment options

You must be logged in to vote
2 replies
@fhdsouza
Comment options

@ecraig12345
Comment options

Answer selected by micahgodbolt
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
2 participants
Converted from issue

This discussion was converted from issue #16249 on December 16, 2020 22:06.