Skip to content

Conversation

@overlookmotel
Copy link
Member

@overlookmotel overlookmotel commented Aug 19, 2025

Pure refactor of tests related to ESTree.

ESTreeSerializer implements Default, so create ESTreeSerializers with default, instead of explicitly passing ranges: false.

@github-actions github-actions bot added the C-test Category - Testing. Code is missing test cases, or a PR is adding them label Aug 19, 2025
Copy link
Member Author


How to use the Graphite Merge Queue

Add either label to this PR to merge it via the merge queue:

  • 0-merge - adds this PR to the back of the merge queue
  • hotfix - for urgent hot fixes, skip the queue and merge this PR next

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.

@overlookmotel overlookmotel marked this pull request as ready for review August 19, 2025 11:47
Copilot AI review requested due to automatic review settings August 19, 2025 11:47
Copy link
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

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-hq
Copy link

codspeed-hq bot commented Aug 19, 2025

CodSpeed Instrumentation Performance Report

Merging #13211 will not alter performance

Comparing 08-19-test_estree_allocator_use_default_to_create_estreeserializer_s (792ae31) with main (ade2ccb)

Summary

✅ 34 untouched benchmarks

@camc314 camc314 added the 0-merge Merge with Graphite Merge Queue label Aug 19, 2025
Copy link
Contributor

camc314 commented Aug 19, 2025

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`.
@graphite-app graphite-app bot force-pushed the 08-19-test_estree_allocator_use_default_to_create_estreeserializer_s branch from 9211f52 to 792ae31 Compare August 19, 2025 11:54
@graphite-app graphite-app bot merged commit 792ae31 into main Aug 19, 2025
26 checks passed
@graphite-app graphite-app bot deleted the 08-19-test_estree_allocator_use_default_to_create_estreeserializer_s branch August 19, 2025 12:00
@graphite-app graphite-app bot removed the 0-merge Merge with Graphite Merge Queue label Aug 19, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

C-test Category - Testing. Code is missing test cases, or a PR is adding them

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants