Skip to content

chore: split out async-rewriter tests into separate package - #2733

Merged
addaleax merged 4 commits into
mainfrom
async-rewriter-split-out-tests
May 26, 2026
Merged

chore: split out async-rewriter tests into separate package#2733
addaleax merged 4 commits into
mainfrom
async-rewriter-split-out-tests

Conversation

@addaleax

Copy link
Copy Markdown
Collaborator

This will be a prerequisite for productionizing a new iteration of the async rewriter, such as the one proposed in #1931.

This will be a prerequisite for productionizing a new iteration
of the async rewriter, such as the one proposed in
#1931.
Copilot AI review requested due to automatic review settings May 26, 2026 14:02
@addaleax
addaleax requested a review from a team as a code owner May 26, 2026 14:02
@addaleax
addaleax requested a review from himanshusinghs May 26, 2026 14:02
@addaleax addaleax added the no-title-validation Skips validation of PR titles (conventional commit adherence + JIRA ticket inclusion) label May 26, 2026
@addaleax addaleax added the no-title-validation Skips validation of PR titles (conventional commit adherence + JIRA ticket inclusion) label May 26, 2026

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

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 extracts the async rewriter’s large Mocha test suite from @mongosh/async-rewriter2 into a new reusable workspace package (@mongosh/async-rewriter-spec) so that alternative async rewriter implementations can be validated against the same spec.

Changes:

  • Introduces @mongosh/async-rewriter-spec with a runTests() helper that hosts the shared async-rewriter test suite.
  • Refactors @mongosh/async-rewriter2 tests to call the shared runTests() suite and exposes AsyncWriter as a named export.
  • Updates workspace/CI configuration to include the new package and to only generate Evergreen unit-test tasks for packages that define test-ci.

Reviewed changes

Copilot reviewed 22 out of 23 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
packages/async-rewriter2/src/index.ts Adds a named AsyncWriter export alongside the default export.
packages/async-rewriter2/src/async-writer-babel.spec.ts Replaces the in-file test suite with a call into @mongosh/async-rewriter-spec.
packages/async-rewriter2/package.json Adds @mongosh/async-rewriter-spec as a dev dependency.
packages/async-rewriter-spec/tsconfig.json Adds TS config for the new spec package outputting to lib/.
packages/async-rewriter-spec/tsconfig-lint.json Adds lint TS config including test/ and benchmark/.
packages/async-rewriter-spec/test/fixtures/with-domain.js Adjusts fixture to load runtime support code via an env-provided file path.
packages/async-rewriter-spec/src/index.ts New reusable async-rewriter spec test suite implementation (runTests).
packages/async-rewriter-spec/README.md Documents the purpose of the reusable spec package.
packages/async-rewriter-spec/package.json New package manifest for @mongosh/async-rewriter-spec.
packages/async-rewriter-spec/LICENSE Adds Apache 2.0 license file for the new package.
packages/async-rewriter-spec/AUTHORS Adds AUTHORS file for the new package.
packages/async-rewriter-spec/.prettierrc.json Adds Prettier config reference for the new package.
packages/async-rewriter-spec/.prettierignore Adds Prettier ignore rules for build/test artifacts.
packages/async-rewriter-spec/.npmignore Adds npm ignore rules for the new package.
packages/async-rewriter-spec/.mocharc.json Adds Mocha config for running TS-based specs in the new package.
packages/async-rewriter-spec/.gitignore Adds gitignore entries for build output and local artifacts.
packages/async-rewriter-spec/.eslintrc.js Adds ESLint config for the new package.
packages/async-rewriter-spec/.eslintignore Adds ESLint ignore rules for build output and local artifacts.
package.json Registers packages/async-rewriter-spec in workspaces ordering.
package-lock.json Adds workspace link entries for @mongosh/async-rewriter-spec.
mongosh.code-workspace Adds the new package folder to the workspace and reorders entries.
.evergreen/tasks/unit-tests.js Updates unit-test task generation to use full package.json and require test-ci script.
.evergreen.yml Removes Evergreen unit-test tasks/artifacts related to the testing package.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread packages/async-rewriter-spec/package.json
Comment thread packages/async-rewriter-spec/.npmignore Outdated
@github-actions

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@github-actions

This comment was marked as outdated.

@github-actions

Copy link
Copy Markdown
Contributor

tc39/test-262 test results

     1 files       1 suites   18d 13h 47m 16s ⏱️
23 648 tests 19 873 ✅ 0 💤 3 775 ❌
45 162 runs  38 215 ✅ 0 💤 6 947 ❌

For more details on these failures, see this check.

Results for commit 11f5a81.

@github-actions

Copy link
Copy Markdown
Contributor

test262 conformance tests

There has been 45 new failures in commit 04cfb29 compared to the baseline commit (main).

@addaleax
addaleax merged commit 90025a4 into main May 26, 2026
152 of 158 checks passed
@addaleax
addaleax deleted the async-rewriter-split-out-tests branch May 26, 2026 19:39
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

no-title-validation Skips validation of PR titles (conventional commit adherence + JIRA ticket inclusion)

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants