test_runner: add t.assert.fileSnapshot()#56459
Conversation
|
Review requested:
|
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #56459 +/- ##
=======================================
Coverage 89.16% 89.17%
=======================================
Files 662 662
Lines 191668 191731 +63
Branches 36884 36894 +10
=======================================
+ Hits 170908 170967 +59
+ Misses 13621 13620 -1
- Partials 7139 7144 +5
|
mcollina
left a comment
There was a problem hiding this comment.
lgtm
I think adding a base path that's going to be applied to all non-absolute paths would be cool. Something like require('node:test').setFileSnapshotDir('/my/path').
|
That would be easy to implement. My only concern would be that we already have |
This commit adds a t.assert.fileSnapshot() API to the test runner. This is similar to how snapshot tests work in core, as well as userland options such as toMatchFileSnapshot().
e76e07b to
e80cc64
Compare
|
Rebased due to conflicts. Approval/re-approval requested. |
|
Landed in 19c8cc1 |
This commit adds a
t.assert.fileSnapshot()API to the test runner. This is similar to how snapshot tests work in core, as well as userland options such astoMatchFileSnapshot().