test(ast/estree): speed up raw transfer tests#9521
Merged
graphite-app[bot] merged 1 commit intomainfrom Mar 4, 2025
Merged
Conversation
Member
Author
This was referenced Mar 3, 2025
673323e to
fcbec75
Compare
ad7e389 to
4bd7f8c
Compare
fcbec75 to
8ba8c68
Compare
4bd7f8c to
d8c7852
Compare
d8c7852 to
47fe6f5
Compare
8ba8c68 to
e477f85
Compare
Contributor
Merge activity
|
Speed up the tests for raw transfer by serializing output to JSON, and comparing as string to the `acorn-test262` JSON snapshots. This is faster than running `parseSync` twice with "raw" and "standard" settings, and comparing the 2 - time to run the NAPI parser tests is reduced by half. There are still 5 tests which compare 5 sample JS/TS files (same ones as used in benchmarks) with a full raw-vs-standard comparison. These tests cover the other parts of `parseSync`'s return value - `comments`, `module` and `errors`. They also give some limited test coverage for AST of TS files.
e477f85 to
4056560
Compare
47fe6f5 to
4378a66
Compare
Base automatically changed from
03-03-feat_ast_estree_option_to_return_js-only_ast
to
main
March 4, 2025 14:49
This was referenced Mar 4, 2025
Merged
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.

Speed up the tests for raw transfer by serializing output to JSON, and comparing as string to the
acorn-test262JSON snapshots. This is faster than runningparseSynctwice with "raw" and "standard" settings, and comparing the 2 - time to run the NAPI parser tests is reduced by half.There are still 5 tests which compare 5 sample JS/TS files (same ones as used in benchmarks) with a full raw-vs-standard comparison. These tests cover the other parts of
parseSync's return value -comments,moduleanderrors. They also give some limited test coverage for AST of TS files.