Skip to content

Commit

Permalink
fix: default to faled tests and unchecked snapshots when updating sna…
Browse files Browse the repository at this point in the history
…pshots (#1238)
  • Loading branch information
sheremet-va committed May 5, 2022
1 parent 4de5da7 commit 3d8e846
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion packages/vitest/src/node/core.ts
Expand Up @@ -263,7 +263,10 @@ export class Vitest {

async updateSnapshot(files?: string[]) {
// default to failed files
files = files || this.state.getFailedFilepaths()
files = files || [
...this.state.getFailedFilepaths(),
...this.snapshot.summary.uncheckedKeysByFile.map(s => s.filePath),
]

this.configOverride = {
snapshotOptions: {
Expand Down

0 comments on commit 3d8e846

Please sign in to comment.