Add support for snapshot testing #1142
Labels
effort-high
This will take a while
enhancement
A new or improved feature
priority-medium
This should get done, but it's not a high priority
Intern should have built-in support for snapshot testing for serializable data values. The goal would be for Intern to record values (any JSON-serializable value, like React render trees) to files and provide a way to easily update them.
The simplest API would probably be to create or use an existing chai plugin, something like chai-karma-snapshot or mocha-chai-snapshot. This would give us an API like:
Intern should have two functions accessible via the CLI: a way to update snapshots, and a way to prune them (delete any that are no longer relevant). On the config side, these could live under a
snapshots
property:From the command line, using the current option format in Intern master, the above config could be temporarily enabled with
--snapshots-update
.The text was updated successfully, but these errors were encountered: