Skip to content

Converted to node:test and updated dependencies#141

Open
BranGuzmen wants to merge 8 commits intomainfrom
typescript-6
Open

Converted to node:test and updated dependencies#141
BranGuzmen wants to merge 8 commits intomainfrom
typescript-6

Conversation

@BranGuzmen
Copy link
Copy Markdown
Contributor

@BranGuzmen BranGuzmen commented Mar 25, 2026

Closes #142

@BranGuzmen BranGuzmen self-assigned this Mar 25, 2026
Copilot AI review requested due to automatic review settings March 25, 2026 22:29
Copy link
Copy Markdown

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 migrates the repository’s rule/unit tests from Jest to Node’s built-in node:test runner, while also bumping the plugin’s major version and updating ESLint/TypeScript-ESLint dependencies and CI workflows to newer Node/Eslint versions.

Changes:

  • Replaced Jest-based specs with node:test-based specs and introduced a shared RuleTester factory (src/rule-tester.test.ts).
  • Updated dependencies/engines (major version bump) and adjusted scripts/workflows for node --test + coverage.
  • Applied broad formatting/line-wrapping changes across rules, specs, and internal helper utilities.

Reviewed changes

Copilot reviewed 70 out of 71 changed files in this pull request and generated 10 comments.

Show a summary per file
File Description
ts-init/typings.test.ts Formatting updates to TypeScript fixture typings used by type-aware tests.
src/ts-tester.test.ts Removed old TS RuleTester helper (Jest-era).
src/tester.test.ts Removed old ESLint RuleTester helper (Jest-era).
src/rule-tester.test.ts Added centralized RuleTester factories for node:test.
src/require-type-out-of-type-only-imports.ts Formatting-only changes.
src/require-type-out-of-type-only-imports.spec.ts Migrated spec to node:test + shared tester.
src/require-ts-extension-imports-exports.ts Formatting-only changes.
src/require-ts-extension-imports-exports.spec.ts Migrated spec to node:test module mocking + shared tester.
src/require-strict-assert.ts Formatting-only changes.
src/require-strict-assert.spec.ts Migrated spec to node:test + shared ESLint tester.
src/require-service-call-response-declaration.ts Updated imports to .ts extensions; formatting.
src/require-service-call-response-declaration.spec.ts Migrated spec to node:test + shared TS tester.
src/require-resolve-full-response.ts Refactor/formatting inside rule create(); no functional intent indicated.
src/require-resolve-full-response.spec.ts Migrated spec to node:test + shared TS tester.
src/require-fixed-services-import.ts Formatting-only changes.
src/require-fixed-services-import.spec.ts Migrated spec to node:test + shared TS tester.
src/require-assert-predicate-rejects-throws.ts Formatting-only changes.
src/require-assert-predicate-rejects-throws.spec.ts Migrated spec to node:test + shared ESLint tester.
src/require-assert-message.ts Formatting-only changes.
src/require-assert-message.spec.ts Migrated spec to node:test + shared TS tester.
src/regular-expression-comment.ts Formatting-only changes.
src/regular-expression-comment.spec.ts Migrated spec to node:test + shared ESLint tester.
src/object-literal-response.ts Formatting-only changes.
src/object-literal-response.spec.ts Migrated spec to node:test + shared ESLint tester.
src/no-wallaby-comment.ts Formatting-only changes (regex/comment handling unchanged).
src/no-wallaby-comment.spec.ts Migrated spec to node:test + shared ESLint tester.
src/no-uuid.ts Formatting-only changes.
src/no-uuid.spec.ts Migrated spec to node:test + shared ESLint tester.
src/no-util.ts Formatting-only changes.
src/no-util.spec.ts Migrated spec to node:test + shared TS tester.
src/no-test-import.ts Formatting-only changes.
src/no-test-import.spec.ts Migrated spec to node:test + shared ESLint tester.
src/no-status-code-assert.ts Updated import to .ts + formatting.
src/no-status-code-assert.spec.ts Migrated spec to node:test + shared TS tester.
src/no-side-effects.ts Formatting plus meta/schema adjustments.
src/no-serve-runtime.spec.ts Migrated spec to node:test + shared TS tester.
src/no-random-v4-uuid.ts Formatting-only changes.
src/no-random-v4-uuid.spec.ts Migrated spec to node:test + shared TS tester.
src/no-legacy-service-typing.ts Formatting plus meta/schema adjustments.
src/no-legacy-service-typing.spec.ts Migrated spec to node:test + shared TS tester.
src/no-enum.spec.ts Migrated spec to node:test + shared TS tester.
src/no-duplicated-imports.ts Formatting-only changes.
src/no-duplicated-imports.spec.ts Migrated spec to node:test + shared TS tester.
src/no-card-numbers.ts Formatting-only changes.
src/no-card-numbers.spec.ts Migrated spec to node:test + shared ESLint tester.
src/library/ts-tree.ts Formatting-only changes.
src/library/tree.ts Formatting-only changes.
src/library/format.ts Formatting-only changes.
src/invalid-json-stringify.ts Formatting-only changes.
src/invalid-json-stringify.spec.ts Migrated spec to node:test + shared ESLint tester.
src/index.ts Import formatting/line wrapping.
src/file-path-comment.ts Formatting-only changes.
src/file-path-comment.spec.ts Migrated spec to node:test + shared ESLint tester.
src/aws/require-consistent-read.ts Formatting plus slight rule wrapper restructuring.
src/aws/require-consistent-read.spec.ts Migrated spec to node:test + shared TS tester.
src/aws/require-aws-config.ts Formatting plus minor logic cleanup in NewExpression reporting.
src/aws/require-aws-config.spec.ts Migrated spec to node:test + shared TS tester.
src/aws/require-aws-bare-bones.ts Formatting-only changes.
src/aws/is-aws-sdk-v3-used.ts Formatting-only changes.
package.json Major version bump; dependency updates; switch CI scripts from Jest to node --test; adjust lint ignores and engine/peer ranges.
eslint.config.mjs Removed eslint-plugin-import usage; updated eslint-plugin-eslint-plugin config; added node:test-safe calls for no-floating-promises.
docs/rules/require-service-call-response-declaration.md Formatting-only changes in docs example.
.github/workflows/coverage.yml Updated coverage workflow to run node --test coverage and changed reporter inputs.
.github/workflows/ci.yml Updated CI Node matrix versions.
.github/workflows/check-published-scheduled.yml Adjusted schedule and removed manual dispatch trigger.
.github/workflows/check-pr-reviews.yml Minor workflow step/name ordering tweak.

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

Comment thread src/rule-tester.test.ts
Comment thread src/no-test-import.spec.ts Outdated
Comment thread src/require-assert-predicate-rejects-throws.spec.ts Outdated
Comment thread src/no-legacy-service-typing.ts
Comment thread src/no-side-effects.ts
Comment thread src/no-test-import.spec.ts Outdated
Comment thread src/no-test-import.spec.ts Outdated
Comment thread src/no-legacy-service-typing.ts
Comment thread src/no-side-effects.ts
Comment thread src/require-assert-message.spec.ts Outdated
@github-actions
Copy link
Copy Markdown

Beta Published - Install Command: npm install @checkdigit/eslint-plugin@8.0.0-PR.141-b8c9

@BranGuzmen BranGuzmen requested a review from carlansley April 1, 2026 17:10
@BranGuzmen
Copy link
Copy Markdown
Contributor Author

Publish-beta action is failing with a 403. Probably an old npm token

@github-actions
Copy link
Copy Markdown

github-actions Bot commented Apr 1, 2026

Coverage after merging typescript-6 into main will be

98.24%▴ +12.12%

Coverage Report
FileStmtsBranchesFuncsLinesUncovered Lines
src
   file-path-comment.spec.ts100%100%100%100%
   file-path-comment.ts100%100%100%100%
   get-documentation-url.ts100%100%100%100%
   invalid-json-stringify.spec.ts100%100%100%100%
   invalid-json-stringify.ts100%100%100%100%
   no-card-numbers.spec.ts100%100%100%100%
   no-card-numbers.ts95.41%89.66%100%96.20%141–146, 151–153
   no-duplicated-imports.spec.ts100%100%100%100%
   no-duplicated-imports.ts100%100%100%100%
   no-enum.spec.ts100%100%100%100%
   no-enum.ts100%100%100%100%
   no-legacy-service-typing.spec.ts100%100%100%100%
   no-legacy-service-typing.ts100%100%100%100%
   no-promise-instance-method.spec.ts100%100%100%100%
   no-promise-instance-method.ts100%100%100%100%
   no-random-v4-uuid.spec.ts100%100%100%100%
   no-random-v4-uuid.ts100%100%100%100%
   no-serve-runtime.spec.ts100%100%100%100%
   no-serve-runtime.ts100%100%100%100%
   no-side-effects.spec.ts100%100%100%100%
   no-side-effects.ts98.99%97.75%100%99.30%217–219, 255
   no-status-code-assert.spec.ts100%100%100%100%
   no-status-code-assert.ts100%100%100%100%
   no-test-import.spec.ts100%100%100%100%
   no-test-import.ts100%100%100%100%
   no-util.spec.ts100%100%100%100%
   no-util.ts100%100%100%100%
   no-uuid.spec.ts100%100%100%100%
   no-uuid.ts95.56%87.50%100%96.49%97–99, 107–109
   no-wallaby-comment.spec.ts100%100%100%100%
   no-wallaby-comment.ts98.08%85.71%100%100%67–68, 88
   object-literal-response.spec.ts100%100%100%100%
   object-literal-response.ts100%100%100%100%
   regular-expression-comment.spec.ts100%100%100%100%
   regular-expression-comment.ts95.96%90%100%97.37%40–42, 62
   require-assert-message.spec.ts100%100%100%100%
   require-assert-message.ts100%100%100%100%
   require-assert-predicate-rejects-throws.spec.ts100%100%100%100%
   require-assert-predicate-rejects-throws.ts100%100%100%100%
   require-fixed-services-import.spec.ts100%100%100%100%
   require-fixed-services-import.ts100%100%100%100%
   require-resolve-full-response.spec.ts100%100%100%100%
   require-resolve-full-response.ts85.12%78.69%100%86.04%57, 85–87, 103–105, 118–120, 124–126, 132–134, 136–138, 140–142, 151–153, 156–159, 175–177, 242–259
   require-service-call-response-declaration.spec.ts100%100%100%100%
   require-service-call-response-declaration.ts81.25%83.33%100%80.46%64–81
   require-strict-assert.spec.ts100%100%100%100%
   require-strict-assert.ts98.59%92.31%100%100%48, 50
   require-ts-extension-imports-exports.spec.ts100%100%100%100%
   require-ts-extension-imports-exports.ts100%100%100%100%
   require-type-out-of-type-only-imports.spec.ts100%100%100%100%
   require-type-out-of-type-only-imports.ts100%100%100%100%
   service.ts100%100%100%100%
src/aws
   require-aws-bare-bones.spec.ts100%100%100%100%
   require-aws-bare-bones.ts98.60%95.83%100%99.11%67–68
   require-aws-config.spec.ts100%100%100%100%
   require-aws-config.ts90.97%95.24%100%89.76%108–121
   require-consistent-read.spec.ts100%100%100%100%
   require-consistent-read.ts94.81%87.76%100%96.23%29–31, 36–38, 47–49, 66–68, 115, 117
src/library
   ts-tree.ts49.31%53.33%44.44%49.17%29–31, 31–32, 35, 35–37, 37–39, 44–45, 48–51, 67–86, 89–108, 111–120

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

Udpated dependecies and switched to using node:test

2 participants