test(estree, allocator): use default to create ESTreeSerializers#13211
Conversation
How to use the Graphite Merge QueueAdd either label to this PR to merge it via the merge queue:
You must have a Graphite account in order to use the merge queue. Sign up using this link. An organization admin has enabled the Graphite Merge Queue in this repository. Please do not merge from GitHub as this will restart CI on PRs being processed by the merge queue. This stack of pull requests is managed by Graphite. Learn more about stacking. |
There was a problem hiding this comment.
Pull Request Overview
This PR refactors test code to use the default() method instead of explicitly passing ranges: false when creating ESTreeSerializer instances, taking advantage of the Default implementation.
- Replace explicit constructor calls with
default()method across all ESTreeSerializer types - Simplify test code by leveraging the Default trait implementation
- Maintain identical functionality while improving code consistency
Reviewed Changes
Copilot reviewed 7 out of 7 changed files in this pull request and generated no comments.
Show a summary per file
| File | Description |
|---|---|
| crates/oxc_estree/src/serialize/structs.rs | Updated serializer initialization in struct serialization tests |
| crates/oxc_estree/src/serialize/strings.rs | Updated serializer initialization in string serialization tests |
| crates/oxc_estree/src/serialize/sequences.rs | Updated serializer initialization in sequence serialization tests |
| crates/oxc_estree/src/serialize/primitives.rs | Updated serializer initialization in primitive serialization tests |
| crates/oxc_estree/src/serialize/blanket.rs | Updated serializer initialization in blanket implementation tests |
| crates/oxc_allocator/src/vec.rs | Updated serializer initialization in vector serialization test |
| crates/oxc_allocator/src/boxed.rs | Updated serializer initialization in boxed value serialization test |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
CodSpeed Instrumentation Performance ReportMerging #13211 will not alter performanceComparing Summary
|
Merge activity
|
…13211) Pure refactor of tests related to `ESTree`. `ESTreeSerializer` implements `Default`, so create `ESTreeSerializer`s with `default`, instead of explicitly passing `ranges: false`.
9211f52 to
792ae31
Compare

Pure refactor of tests related to
ESTree.ESTreeSerializerimplementsDefault, so createESTreeSerializers withdefault, instead of explicitly passingranges: false.