Skip to content

Fix CI by migrating to Node's built-in test runner#53

Open
hyperupcall wants to merge 3 commits into
OSS-Docs-Tools:masterfrom
hyperupcall:hyperupcall-esmnodetest
Open

Fix CI by migrating to Node's built-in test runner#53
hyperupcall wants to merge 3 commits into
OSS-Docs-Tools:masterfrom
hyperupcall:hyperupcall-esmnodetest

Conversation

@hyperupcall

@hyperupcall hyperupcall commented Apr 13, 2026

Copy link
Copy Markdown
Contributor

AI Notice: I used AI to do the code changes for the migration.

This PR aims to fix issues with CI in #52 by migrating away from Jest. Some facts:

  • ESModules: v12.17.0 drops the --experimental-modules flag and it becomes stable in v12.22.0.
  • Node's Test Runner: Stabilizes in v20.0.0. The --watch flag stabilizes in v22.0.0. Engines field was kept at v20 in this PR since it's optional.

Here's the output on my machine:

$ npm run test

> code-owner-self-merge@1.0.0 test
> node --test

✔ determine who owns a set of files (11.554664ms)
✔ real world (1.38568ms)
✔ real world 2 (1.264941ms)
✔ real world with labels (1.246522ms)
✔ deciding if someone has access to merge (2.901409ms)
▶ githubLoginIsInCodeowners
  ✔ allows folks found in the codeowners (1.496068ms)
  ✔ ignores case (0.876618ms)
  ✔ denies other accounts (1.005145ms)
  ✔ denies subsets of existing accounts (0.805349ms)
✔ githubLoginIsInCodeowners (5.029728ms)
▶ hasValidLgtmSubstring
  ✔ allows lgtm (0.390384ms)
  ✔ denies lgtm but (0.107018ms)
  ✔ denies lgtm but with comma (0.068499ms)
  ✔ denies lgtm in double quotes (0.067529ms)
  ✔ denies lgtm in single quotes (0.069619ms)
  ✔ denies lgtm in inline code blocks (0.060729ms)
✔ hasValidLgtmSubstring (1.038765ms)
ℹ tests 15
ℹ suites 2
ℹ pass 15
ℹ fail 0
ℹ cancelled 0
ℹ skipped 0
ℹ todo 0
ℹ duration_ms 152.327036

Lastly, I also used pinact to update the versions of the actions in GitHub actions.

@hyperupcall hyperupcall requested a review from orta as a code owner April 13, 2026 23:02
@hyperupcall hyperupcall force-pushed the hyperupcall-esmnodetest branch from cefea6a to 32df5af Compare April 13, 2026 23:09
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant