Skip to content

test: verify snapshot updates in the Vitest snapshot e2e test - #34710

Draft
clydin wants to merge 1 commit into
angular:mainfrom
clydin:vitest-snapshot-update-e2e
Draft

clydin wants to merge 1 commit into
angular:mainfrom
clydin:vitest-snapshot-update-e2e

Conversation

@clydin

@clydin clydin commented Nov 12, 2026

Copy link
Copy Markdown
Member

Extends the Vitest snapshot e2e test to cover updating existing snapshots after a mismatch. Vitest reads the UPDATE_SNAPSHOT environment variable directly, which is currently the way to request an update through ng test without a Vitest configuration file since the builder does not forward the --update flag.

The test now verifies that both the file snapshot and the inline snapshot are rewritten on disk with the new output and that a subsequent run passes without any further snapshot changes.

Extends the Vitest snapshot e2e test to cover updating existing snapshots
after a mismatch. Vitest reads the `UPDATE_SNAPSHOT` environment variable
directly, which is currently the way to request an update through `ng test`
without a Vitest configuration file since the builder does not forward the
`--update` flag.

The test now verifies that both the file snapshot and the inline snapshot
are rewritten on disk with the new output and that a subsequent run passes
without any further snapshot changes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant