New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Introducing AVA snapshots v3 #2685
Commits on Feb 13, 2021
-
This index was used to establish declaration order of beforeEach and afterEach hooks. Since these hooks no longer support snapshots, associatedTaskIndex is unnecessary.
Configuration menu - View commit details
-
Copy full SHA for a8b2a4f - Browse repository at this point
Copy the full SHA a8b2a4fView commit details -
This index was used to establish declaration order of snapshots with ids. Since snapshots with ids are no longer supported, this index is unnecessary.
Configuration menu - View commit details
-
Copy full SHA for 207b33d - Browse repository at this point
Copy the full SHA 207b33dView commit details
Commits on Feb 14, 2021
-
Draft a placeholder snapshot format
This format contains all the necessary information for regenerating snapshot reports (test titles, snapshot labels, snapshot ordering) but isn't designed for robustness of any sort, only ease of implementation. Once a proof of concept is ready, the format should be revisited.
Configuration menu - View commit details
-
Copy full SHA for 28ea70f - Browse repository at this point
Copy the full SHA 28ea70fView commit details -
Configuration menu - View commit details
-
Copy full SHA for 0fbae43 - Browse repository at this point
Copy the full SHA 0fbae43View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2b40b78 - Browse repository at this point
Copy the full SHA 2b40b78View commit details -
Configuration menu - View commit details
-
Copy full SHA for b537c46 - Browse repository at this point
Copy the full SHA b537c46View commit details -
Configuration menu - View commit details
-
Copy full SHA for 30b02e0 - Browse repository at this point
Copy the full SHA 30b02e0View commit details -
Configuration menu - View commit details
-
Copy full SHA for 3721489 - Browse repository at this point
Copy the full SHA 3721489View commit details -
Update test/snapshot-updates snapshots
This requires deleting all the .snap files, as well as modifying contains-only.js and then putting it back after.
Configuration menu - View commit details
-
Copy full SHA for 3a85c64 - Browse repository at this point
Copy the full SHA 3a85c64View commit details -
Configuration menu - View commit details
-
Copy full SHA for 2084726 - Browse repository at this point
Copy the full SHA 2084726View commit details -
Configuration menu - View commit details
-
Copy full SHA for 7403619 - Browse repository at this point
Copy the full SHA 7403619View commit details -
Configuration menu - View commit details
-
Copy full SHA for a69ec49 - Browse repository at this point
Copy the full SHA a69ec49View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6f80dc4 - Browse repository at this point
Copy the full SHA 6f80dc4View commit details -
Configuration menu - View commit details
-
Copy full SHA for b7b6fb3 - Browse repository at this point
Copy the full SHA b7b6fb3View commit details -
Allow test.skip() with --update-snapshots
Still prohibit removing snapshots when any block was skipped.
Configuration menu - View commit details
-
Copy full SHA for 49204dc - Browse repository at this point
Copy the full SHA 49204dcView commit details -
Configuration menu - View commit details
-
Copy full SHA for 69e2f62 - Browse repository at this point
Copy the full SHA 69e2f62View commit details -
Generalize Runner lazy-loading snapshot manager
This enables unit tests to continue using Runners without snapshot support, while allowing Runner to use the snapshot manager interface as though it was pre-loaded.
Configuration menu - View commit details
-
Copy full SHA for 66fcf02 - Browse repository at this point
Copy the full SHA 66fcf02View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6e83431 - Browse repository at this point
Copy the full SHA 6e83431View commit details -
Update tests to allow -u with test selection
Including test.only(), --match, and line number selection.
Configuration menu - View commit details
-
Copy full SHA for b668f9d - Browse repository at this point
Copy the full SHA b668f9dView commit details -
Configuration menu - View commit details
-
Copy full SHA for 7074973 - Browse repository at this point
Copy the full SHA 7074973View commit details -
Configuration menu - View commit details
-
Copy full SHA for b542aca - Browse repository at this point
Copy the full SHA b542acaView commit details -
Rename snapshot-updates suite to snapshot-workflow
Better conveys the purpose of the test suite. Clarifies the PR diff, since the old snapshot-updates is being entirely removed and replaced.
Configuration menu - View commit details
-
Copy full SHA for 6b8ef30 - Browse repository at this point
Copy the full SHA 6b8ef30View commit details -
Configuration menu - View commit details
-
Copy full SHA for 94bdaef - Browse repository at this point
Copy the full SHA 94bdaefView commit details -
Configuration menu - View commit details
-
Copy full SHA for a9222e6 - Browse repository at this point
Copy the full SHA a9222e6View commit details
Commits on Feb 15, 2021
-
Configuration menu - View commit details
-
Copy full SHA for ca071cf - Browse repository at this point
Copy the full SHA ca071cfView commit details -
Configuration menu - View commit details
-
Copy full SHA for 90c3c01 - Browse repository at this point
Copy the full SHA 90c3c01View commit details -
Configuration menu - View commit details
-
Copy full SHA for 15e226c - Browse repository at this point
Copy the full SHA 15e226cView commit details -
Configuration menu - View commit details
-
Copy full SHA for a777048 - Browse repository at this point
Copy the full SHA a777048View commit details
Commits on Feb 16, 2021
-
Configuration menu - View commit details
-
Copy full SHA for cf43700 - Browse repository at this point
Copy the full SHA cf43700View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8a6d165 - Browse repository at this point
Copy the full SHA 8a6d165View commit details -
Configuration menu - View commit details
-
Copy full SHA for ba8218a - Browse repository at this point
Copy the full SHA ba8218aView commit details -
Configuration menu - View commit details
-
Copy full SHA for bc7cec4 - Browse repository at this point
Copy the full SHA bc7cec4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6a5fc9a - Browse repository at this point
Copy the full SHA 6a5fc9aView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8e4a5a5 - Browse repository at this point
Copy the full SHA 8e4a5a5View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0bac67f - Browse repository at this point
Copy the full SHA 0bac67fView commit details -
Configuration menu - View commit details
-
Copy full SHA for a90c2f9 - Browse repository at this point
Copy the full SHA a90c2f9View commit details -
Test edge case involving new t.snapshot.skip()s
When new t.snapshot.skip() assertions are followed by a t.snapshot() assertion, the run will fail with a RangeError, as a result of attempting to save nonconsecutive snapshots. This can only happen when the t.snapshot.skip()s are wholly new, not when they are the result of skipping an existing snapshot assertion.
Configuration menu - View commit details
-
Copy full SHA for 39adc93 - Browse repository at this point
Copy the full SHA 39adc93View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4d551e3 - Browse repository at this point
Copy the full SHA 4d551e3View commit details -
Configuration menu - View commit details
-
Copy full SHA for 98e7123 - Browse repository at this point
Copy the full SHA 98e7123View commit details
Commits on Feb 17, 2021
-
Revert "Add crude profiling for snapshot-removal tests"
This reverts commit 98e7123.
Configuration menu - View commit details
-
Copy full SHA for 9e7df59 - Browse repository at this point
Copy the full SHA 9e7df59View commit details -
Configuration menu - View commit details
-
Copy full SHA for 499d14f - Browse repository at this point
Copy the full SHA 499d14fView commit details
Commits on Feb 19, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 3af51f7 - Browse repository at this point
Copy the full SHA 3af51f7View commit details -
Configuration menu - View commit details
-
Copy full SHA for 42ee5fe - Browse repository at this point
Copy the full SHA 42ee5feView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2df7169 - Browse repository at this point
Copy the full SHA 2df7169View commit details -
Configuration menu - View commit details
-
Copy full SHA for 8ad7ac8 - Browse repository at this point
Copy the full SHA 8ad7ac8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 272513d - Browse repository at this point
Copy the full SHA 272513dView commit details
Commits on Feb 21, 2021
-
Eagerly load the snapshot manager
Simplifies runner's logic, avoids needing to maintain two separate copies of the snapshot manager interface.
Configuration menu - View commit details
-
Copy full SHA for 2787930 - Browse repository at this point
Copy the full SHA 2787930View commit details -
Refactor path handling in snapshot-manager
Avoids some redundant path.join()s.
Configuration menu - View commit details
-
Copy full SHA for 691334b - Browse repository at this point
Copy the full SHA 691334bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 48e031e - Browse repository at this point
Copy the full SHA 48e031eView commit details -
Configuration menu - View commit details
-
Copy full SHA for 9d6e4c8 - Browse repository at this point
Copy the full SHA 9d6e4c8View commit details -
Configuration menu - View commit details
-
Copy full SHA for 4054903 - Browse repository at this point
Copy the full SHA 4054903View commit details -
Make fewer temporary copies when sorting blocks
Relies on stable sorting. Stable sorting is present in Node v12+ and required as of ECMAScript 2019.
Configuration menu - View commit details
-
Copy full SHA for 701a0d3 - Browse repository at this point
Copy the full SHA 701a0d3View commit details -
Configuration menu - View commit details
-
Copy full SHA for e5d17be - Browse repository at this point
Copy the full SHA e5d17beView commit details -
Only clean snapshots when updating
Fixes edge case with invalid .snap and no snapshot assertions, which produces an empty newBlocksByTitle map without --update-snapshots.
Configuration menu - View commit details
-
Copy full SHA for ff9f32f - Browse repository at this point
Copy the full SHA ff9f32fView commit details
Commits on Feb 22, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 14d1669 - Browse repository at this point
Copy the full SHA 14d1669View commit details -
Configuration menu - View commit details
-
Copy full SHA for 212a875 - Browse repository at this point
Copy the full SHA 212a875View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6ab1156 - Browse repository at this point
Copy the full SHA 6ab1156View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6801ce2 - Browse repository at this point
Copy the full SHA 6801ce2View commit details -
Allows changing the default reported label in the future if desired.
Configuration menu - View commit details
-
Copy full SHA for dec0b4d - Browse repository at this point
Copy the full SHA dec0b4dView commit details -
Record blanks when skipping snaps without data
This occurs when the old snapshots are unreadable or `t.snapshot.skip()` is added at the end of a test. Previously, skipping snapshots when the old snapshots are unreadable would throw either SnapshotError or 'Can't skip snapshot assertions when updating snapshots'. Adding `t.snapshot.skip()` to the end of a test would throw RangeError. Blanks are formatted as `<No Data>` in snapshot reports. Blanks compare equal to anything and are filled in when a value is passed; essentially, they behave like they didn't exist. Internally, blanks are represented with `{buffer: undefined}`.
Configuration menu - View commit details
-
Copy full SHA for a602cf6 - Browse repository at this point
Copy the full SHA a602cf6View commit details -
Squash all decoding errors when updating snapshots
Ensures that --update-snapshots can fix cases where the snapshot file is arbitrarily malformed. These cases previously did, and still do, throw an unhelpful error when not run with --update-snapshots. In snapshot format v2, --update-snapshots did not load the old file at all, avoiding this issue.
Configuration menu - View commit details
-
Copy full SHA for dc03ddb - Browse repository at this point
Copy the full SHA dc03ddbView commit details -
Configuration menu - View commit details
-
Copy full SHA for b5a96e4 - Browse repository at this point
Copy the full SHA b5a96e4View commit details -
Use CBOR options to encourage determinism
We can't ensure deterministic output, but omitting undefined properties, requiring preferred serialization, and sorting map keys should make deterministic output more likely, at the cost of somewhat reduced speed. Canonical CBOR is an outdated specification, replaced in RFC 8949 by "Deterministically Encoded CBOR". If `node-cbor` comes to support the later, updating to it should be backwards-compatible; both are valid CBOR, the major difference being the map key sort order.
Configuration menu - View commit details
-
Copy full SHA for 7643307 - Browse repository at this point
Copy the full SHA 7643307View commit details -
Configuration menu - View commit details
-
Copy full SHA for f9e92e3 - Browse repository at this point
Copy the full SHA f9e92e3View commit details
Commits on Feb 24, 2021
-
Revert "Experiment with pre-generating fixture templates"
This reverts commit f9e92e3.
Configuration menu - View commit details
-
Copy full SHA for 6d55531 - Browse repository at this point
Copy the full SHA 6d55531View commit details -
Configuration menu - View commit details
-
Copy full SHA for c926cb0 - Browse repository at this point
Copy the full SHA c926cb0View commit details
Commits on Feb 27, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 3a416d0 - Browse repository at this point
Copy the full SHA 3a416d0View commit details -
Configuration menu - View commit details
-
Copy full SHA for a9a7ada - Browse repository at this point
Copy the full SHA a9a7adaView commit details -
Configuration menu - View commit details
-
Copy full SHA for c2b5301 - Browse repository at this point
Copy the full SHA c2b5301View commit details -
Configuration menu - View commit details
-
Copy full SHA for d062f2c - Browse repository at this point
Copy the full SHA d062f2cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8787fe4 - Browse repository at this point
Copy the full SHA 8787fe4View commit details -
Configuration menu - View commit details
-
Copy full SHA for e3f7f4c - Browse repository at this point
Copy the full SHA e3f7f4cView commit details -
Configuration menu - View commit details
-
Copy full SHA for 8ed0a4b - Browse repository at this point
Copy the full SHA 8ed0a4bView commit details -
Configuration menu - View commit details
-
Copy full SHA for 2b96059 - Browse repository at this point
Copy the full SHA 2b96059View commit details -
Configuration menu - View commit details
-
Copy full SHA for bf68a42 - Browse repository at this point
Copy the full SHA bf68a42View commit details -
Configuration menu - View commit details
-
Copy full SHA for 1a66adf - Browse repository at this point
Copy the full SHA 1a66adfView commit details
Commits on Feb 28, 2021
-
Configuration menu - View commit details
-
Copy full SHA for b7cf3a0 - Browse repository at this point
Copy the full SHA b7cf3a0View commit details
Commits on Mar 2, 2021
-
Update docs/04-snapshot-testing.md
Keep docs accurate for AVA 3. Co-authored-by: Mark Wubben <mark@novemberborn.net>
Configuration menu - View commit details
-
Copy full SHA for 872506b - Browse repository at this point
Copy the full SHA 872506bView commit details
Commits on Mar 5, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 819e4e6 - Browse repository at this point
Copy the full SHA 819e4e6View commit details -
Configuration menu - View commit details
-
Copy full SHA for 0ed7a86 - Browse repository at this point
Copy the full SHA 0ed7a86View commit details -
Configuration menu - View commit details
-
Copy full SHA for 46b17f2 - Browse repository at this point
Copy the full SHA 46b17f2View commit details -
Configuration menu - View commit details
-
Copy full SHA for afc8b01 - Browse repository at this point
Copy the full SHA afc8b01View commit details -
Configuration menu - View commit details
-
Copy full SHA for bb641f5 - Browse repository at this point
Copy the full SHA bb641f5View commit details -
Move snapshot data reformatting into load, save
The blocksByTitle format is an implementation detail of Manager, whereas the CBOR data structure is a characteristic of the snapshot file protocol. This change reduces codepath duplication between generateReport() and encodeSnapshots(), and avoids passing blockIndices around everywhere. If decodeSnapshots() and encodeSnapshots() are later exposed as a library, this may be closer to the desired interface.
Configuration menu - View commit details
-
Copy full SHA for 36b98e7 - Browse repository at this point
Copy the full SHA 36b98e7View commit details
Commits on Mar 7, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 22b4b98 - Browse repository at this point
Copy the full SHA 22b4b98View commit details -
Configuration menu - View commit details
-
Copy full SHA for 5efbe6a - Browse repository at this point
Copy the full SHA 5efbe6aView commit details
Commits on Mar 12, 2021
-
Snapshot diffs of changed reports
Hopefully will make the snapshot-worker snapshots easier to read.
Configuration menu - View commit details
-
Copy full SHA for cff4c6a - Browse repository at this point
Copy the full SHA cff4c6aView commit details
Commits on Mar 13, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 30f9f66 - Browse repository at this point
Copy the full SHA 30f9f66View commit details