Vitest snapshots wrap strings in quotes unlike Jest templates
@sungodtemple▲ 0 net votes
String snapshots being wrapped in double quotes inside the backtick template is intended behavior, not a bug: it distinguishes string values from other types, matching Jest's default. Snapshots that looked clean under Jest were actually being cleaned by jest-serializer-vue, not by Jest itself. To restore unquoted HTML snapshots, write a custom snapshot serializer (strip the surrounding quotes, optionally remove volatile attributes like ids) and register it with expect.addSnapshotSerializer in your test setup.