Skip to content

chore(@binstruct/png): run the pngsuite test again - #301

Merged
hertzg merged 1 commit into
mainfrom
hertzg/png-revive-pngsuite-test
Sep 26, 2026
Merged

hertzg merged 1 commit into
mainfrom
hertzg/png-revive-pngsuite-test

Conversation

@hertzg

@hertzg hertzg commented Sep 26, 2026

Copy link
Copy Markdown
Owner

Follow-up to #300. The package deno.json excluded ./pngsuite from every Deno command (added in #170), so deno test never discovered the suite and it rotted:

  • the zlib header fields were renamed (compressionLevel -> flevel, checksum -> fcheck, isDictionaryPresent -> fdict) and the test no longer type-checked
  • the tRNS and bKGD cases were added without snapshots

Changes:

  • drop the exclude from packages/@binstruct/png/deno.json (the publish.exclude entry stays, fixtures are not published)
  • fix the field name in the compression test and a misplaced paren in one assertExists call
  • assertExists(index >= 0) becomes assert(index >= 0); a boolean always exists, so those steps could never fail
  • regenerate __snapshots__/pngsuite.test.ts.snap with deno test -u

The snapshot diff is the three renamed header fields and their order, plus 5 new entries. Every other value is byte-identical to the old file.

Root deno task lint and deno task test pass. The parallel run now reports 968 tests, up from 964, with the suite included.

The package deno.json excluded ./pngsuite from every Deno command, so
deno test never discovered the suite and it rotted: the zlib header
fields were renamed (compressionLevel -> flevel, checksum -> fcheck,
isDictionaryPresent -> fdict) and the test no longer type-checked, and
the tRNS and bKGD cases were added without snapshots. Drop the exclude,
fix the field name, regenerate the snapshots. The snapshot values are
unchanged apart from the renamed header fields.

Also turn assertExists(index >= 0) into assert(index >= 0); a boolean
always exists, so those steps could never fail.
@github-actions

Copy link
Copy Markdown
Contributor

Docs preview: https://hertzg.github.io/jsr-monorepo/pr/301/

@github-actions

Copy link
Copy Markdown
Contributor

Benchmark Results

No significant changes detected. 31 benchmark(s) within their noise floor.

@codecov-commenter

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 96.79%. Comparing base (8858052) to head (dccea23).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #301   +/-   ##
=======================================
  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.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@hertzg
hertzg merged commit dbc242e into main Sep 26, 2026
6 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants