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.
Summary
This PR ports the JS tests to use
insta
and the same logic used in other parsers and crates across the codebase. I copied all the files we had intest_data
and moved them in a new folder calledjs_test_suite
, which name is inline with the tests parser infras.All the files that were tagged with a
// SCRIPT
were renamed to have a.cjs
extension. All*.options.json
files now use a validbiome.json
file. With this, I discovered that thegrit_metavariables
weren't implemented for the JS parser (cc @arendjr). This is now fixed, and the filemetavar.ts
works as expected.The
biome_js_parser
crate also had some testing utilities we aren't supposed to use anymore because they now live insidebiome_test_utils
. I removed them and usedbiome_test_utils
instead.I removed some outdated
README.md
files inside the codegen files. That information is already present in thebiome_parser/CONTRIBUTING.md
file.I didn't remove all the comments in the source
.rs
files, that was too much. I think they can stay there for now, and we can remove them later.Test Plan
The current CI should pass