Skip to content

Remove snapshot files when a test file stops using snapshots #1424

Closed
@novemberborn

Description

@novemberborn

Issuehunt badges

When --update-snapshots is passed, if AVA executes a test file for which there are snapshots, but no snapshot assertion is run, we should remove the snapshot files.

What's tricky though is if tests are skipped, or if snapshot assertions are skipped, we should not remove the snapshot files.

See https://github.com/avajs/ava/blob/9d3b1bad681e1aad18ad8cd53407a7ccb1fc5782/lib/runner.js#L205:L207.


IssueHunt Summary

ninevra ninevra has been rewarded.

Backers (Total: $60.00)

Submitted pull Requests


Tips

Metadata

Metadata

Assignees

Type

No type

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions