Skip to content

test: migrate to snapshot tests#77

Merged
mathiasbynens merged 2 commits intonode-unicode:mainfrom
JLHwung:migrate-to-snapshot-tests
Nov 3, 2024
Merged

test: migrate to snapshot tests#77
mathiasbynens merged 2 commits intonode-unicode:mainfrom
JLHwung:migrate-to-snapshot-tests

Conversation

@JLHwung
Copy link
Contributor

@JLHwung JLHwung commented Nov 2, 2024

In this PR we migrate current tests to snapshot tests. After we shrank the package size in #64, the test fixtures are no longer human-readable after compression and base64 encode.

Here we take a snapshot of the decompressed ranges so that if any test is failing, it is easier to known why it is failing. It can also help ensuring the data integrity if we make any compression improvements, such as switching from gzip to brotli.

We also introduce a new dev command: npm run test-update-snapshot will automatically update the snapshots, which should be helpful when we support a new Unicode release.

@mathiasbynens
Copy link
Collaborator

Thanks!

@mathiasbynens mathiasbynens merged commit ca89701 into node-unicode:main Nov 3, 2024
@JLHwung JLHwung deleted the migrate-to-snapshot-tests branch November 3, 2024 18:11
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants