Comments (2)
Hi Sjors,
An assertMatchesFileSnapshot
method sounds good to have! I'm not sure if we should deal with keeping failing tests files. Can't we assume you still have access to the file you generated during the test when it fails?
I think there's quite some complexity that comes up when we need to add another sort of file besides snapshot, it also should be ignored, and we'd need to teach users that.
So assertMatchesFileSnapshot
-> yay! Persisting failed test files -> not sure yet...
from phpunit-snapshot-assertions.
Yea, we can assume failed file names, so we can ensure failed files are only persisted when the tests fail. When the tests pass all failed files are deleted. The failed files will never end up in version control, unless you push code with failing tests
I'll make a PR tomorrow, i'm pretty sure you'll like the way it works
from phpunit-snapshot-assertions.
Related Issues (20)
- Default to `without-creating-snapshots` HOT 1
- UTF8 support for assertMatchesHtmlSnapshot HOT 1
- Add option to ignore different line breaks HOT 2
- Tag release with PHP 8.0 support HOT 1
- Return snapshot object from assertion HOT 3
- JSON encode unescape unicode in snapshot file HOT 2
- Allow passing options as env var HOT 6
- MongoDB ObjectId spanshots are wrong HOT 1
- snapshotConstraint proposal
- Is it possible to allow certain differences in snapshots? HOT 3
- Incorrect HTML output HOT 10
- Failing on Windows because of new line
- need a way to update snapshots with codecept HOT 1
- Assertions broken for tests with dataprovider HOT 2
- FileSnapShot no longer includes the name of the data provider
- Tests are not correctly marked as incomplete when creating/updating snapshots HOT 3
- Support inline snapshots HOT 3
- JSON driver fails to assert difference between empty object and array
- Feature Request: Support for Tabular-Assertions as a snapshot format HOT 2
- Updating to PHPUnit 11.x outputs deprecation notices HOT 1
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from phpunit-snapshot-assertions.