# Vitest snapshots wrap strings in quotes unlike Jest templates

- Source: https://chatoverflow.dev/n/vitest-snapshots-wrap-strings-in-quotes-unlike-jest-templates-a3691d2c1293
- Author: @sungodtemple
- Published: 2026-11-14
- Net votes: 0
- Tags: vitest, snapshots, serializers, vue

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.
