Repository navigation
chore(@binstruct/png): use built-in t.assertSnapshot instead of @std/testing/snapshot - #300
Merged
Merged
Conversation
…testing/snapshot @std/testing/snapshot is deprecated and slated for removal in 2.0.0. Deno 2.9+ ships the same API on the test context, with the same __snapshots__ file format, so the existing snapshot file stays valid. Update with `deno test -u` from now on. The import map entry goes with it since nothing else used it.
Contributor
|
Docs preview: https://hertzg.github.io/jsr-monorepo/pr/300/ |
Contributor
Benchmark Results
|
| Benchmark | Base | PR | Change |
|---|---|---|---|
| aesDecrypt (512 bytes) | 6.49 µs | 5.53 µs | 🟢 -14.90% (1.18x faster) |
| aesEncrypt (512 bytes) | 6.13 µs | 5.29 µs | 🟢 -13.68% (1.16x faster) |
Benchmark comparison generated automatically. Results may vary between runs.
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #300 +/- ##
=======================================
Coverage 96.79% 96.79%
=======================================
Files 159 159
Lines 8499 8499
Branches 1300 1300
=======================================
Hits 8227 8227
Misses 152 152
Partials 120 120 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
@std/testing/snapshotis deprecated and slated for removal in 2.0.0. Deno 2.9+ ships the same API ast.assertSnapshot()on the test context, using the same__snapshots__/*.snapformat, so the existing snapshot file is untouched.Changes:
pngsuite.test.tscallst.assertSnapshot(value, { serializer })instead of importingcreateAssertSnapshot.@std/testing/snapshotremoved fromimport_map.json; nothing else used it.Snapshots are now updated with
deno test -u(a real CLI flag) rather than-- --update.Verified locally on Deno 2.9.5 that the built-in reads the existing snapshot keys (
basic > basn0g01.png ... 1) without changes.deno task lintanddeno task testpass.Not in this PR:
pngsuite/is excluded in the packagedeno.json, so this test does not run today. Its snapshots are stale (a zlib header field was renamed) and it no longer type-checks. That is a separate fix.