nicolo-ribaudo / jest-light-runner

A Jest runner that runs tests directly in bare Node.js, without virtualizing the environment.
MIT License
232 stars 24 forks source link

Fix `addSnapshotSerializer` #47

Closed fisker closed 2 years ago

fisker commented 2 years ago

When calling expect.addSnapshotSerializer in one test file, the serializer should not be used globally.

Solution verified in https://github.com/prettier/prettier/pull/12859

Fixes #35

nicolo-ribaudo commented 2 years ago

Thank you! I made some edits, but the behavior should be the same.