Skip to content

fix(lint): use plain node:assert import in allowread-fail-closed test - #1612

Merged
kriszyp merged 1 commit into
mainfrom
fix/lint-assert-strict-import
Jul 6, 2026
Merged

fix(lint): use plain node:assert import in allowread-fail-closed test#1612
kriszyp merged 1 commit into
mainfrom
fix/lint-assert-strict-import

Conversation

@dawsontoth

Copy link
Copy Markdown
Contributor

What

Fixes the runLinter CI failure on main.

The runLinter job runs npm run lint:required (oxlint --quiet), which fails on a single error:

integrationTests/resources/allowread-fail-closed.test.ts
  14:1  error  'node:assert/strict' import is restricted from being used.  eslint(no-restricted-imports)

The repo's .oxlintrc.json restricts imports from node:assert/strict (and assert/strict):

Use plain node:assert; call assert.strictEqual/deepStrictEqual for strict checks (AGENTS.md test style).

Change

One line — switch the import from node:assert/strict to plain node:assert:

-import { ok, strictEqual } from 'node:assert/strict';
+import { ok, strictEqual } from 'node:assert';

node:assert's named ok / strictEqual are already the strict variants, so behavior is unchanged. This also matches the convention used across sibling integration tests (import { ok, strictEqual } from 'node:assert').

Verification

  • npm run lint:required (the CI command) → 0 errors (previously 1).
  • prettier --check on the file → clean.

Note: main also currently fails Unit Test (flaky event-ordering assertions, e.g. "expected at least 1 event for id=1, got 0"); that's a separate issue and out of scope for this lint-only fix.

🤖 Generated with Claude Code

The runLinter CI job (oxlint --quiet) fails on a single error: the
no-restricted-imports rule forbids importing from 'node:assert/strict'
(.oxlintrc.json), directing to plain node:assert whose strictEqual/ok
named exports are already strict. Switch the import path to match the
repo-wide convention used by sibling integration tests.

Co-Authored-By: Claude Opus 4.8 (1M context) <noreply@anthropic.com>
@claude

claude Bot commented Jul 6, 2026

Copy link
Copy Markdown
Contributor

Reviewed; no blockers found.

@gemini-code-assist gemini-code-assist Bot 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.

Code Review

This pull request updates the import statement in integrationTests/resources/allowread-fail-closed.test.ts to import ok and strictEqual from node:assert instead of node:assert/strict. There are no review comments, and I have no feedback to provide.

@kriszyp kriszyp left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

Reviewed via Claude review-queue — trivial, correct one-line fix (node:assert/strict → node:assert, matching #1558's lint rule). Approving to unblock #1607/#1608, which are failing lint on this exact same pre-existing issue.

@kriszyp
kriszyp merged commit ab88fbe into main Jul 6, 2026
44 of 47 checks passed
@kriszyp
kriszyp deleted the fix/lint-assert-strict-import branch July 6, 2026 14:16
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.

2 participants