Add customserializer option to vitest.config.ts #2023
Labels
enhancement
New feature or request
p2-nice-to-have
Not breaking anything but nice to have (priority)
pr welcome
Clear and concise description of the problem
For compatibility with jest, add customSerializers as a global option.
Workaround:
Add a setup function, which runs
expect.addSnapshotSerializer
before every test file.Suggested solution
Follow Jest's API
Alternative
Add a global setup file option, which is just run once during the entire jest process (not for every test file). This file could do something like
expect.addSnapshotSerializer(mySerializer)
.Con: No Jest compat
Pro: More flexible
Additional context
No response
Validations
The text was updated successfully, but these errors were encountered: