You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
In our project we are using vitest with fluentUI, we have snapshot tests which need the classNames serialized, I have tried adding the the serializer both in config and in our setupTests file using expect.addSnapshotSerializer but neither of these seem to work. How would I setup my testing to include the serializer?
import * as fluentSerializerMergeStyles from '@fluentui/jest-serializer-merge-styles';
// other imports
// other setup
beforeEach(() => {
expect.addSnapshotSerializer(fluentSerializerMergeStyles as any);
});
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
Problem
In our project we are using vitest with fluentUI, we have snapshot tests which need the classNames serialized, I have tried adding the the serializer both in config and in our setupTests file using expect.addSnapshotSerializer but neither of these seem to work. How would I setup my testing to include the serializer?
Attempted solutions
Adding in config with string
vite.config.ts
Adding in config with all import
vite.config.ts
Adding in config in setupTests
as in other discussion #4233
setupTests.ts
Beta Was this translation helpful? Give feedback.
All reactions