Skip to content

ci: lint TWD tests with twd-lint - #1

Merged
kevinccbsg merged 1 commit into
mainfrom
chore/twd-lint
Oct 18, 2026
Merged

kevinccbsg merged 1 commit into
mainfrom
chore/twd-lint

Conversation

@kevinccbsg

Copy link
Copy Markdown
Member

What

Lints the TWD tests with twd-lint, which catches TWD test mistakes before a browser run: missing awaits on async TWD calls, describe/it/expect imported from the wrong module, rule.request.body on a waitForRequest result, and .only left behind.

  • twd-lint added as a devDependency, with a lint:twd script (npm run lint:twd). This project has no ESLint, and the command needs none.
  • CI runs it right after npm ci, before the mock API and dev server start, so a broken test fails in seconds instead of in the browser run.

Checked

  • npm run lint:twd passes: the existing TWD tests already have no problems.
  • npm ci passes with the latest npm (12.x). npm 11.6 drops two nested @emnapi entries of the optional @tailwindcss/oxide-wasm32-wasi when it rewrites the lockfile, and newer npm refuses npm ci without them, so they are kept as on main.

🤖 Generated with Claude Code

@github-actions

Copy link
Copy Markdown

✅ TWD: 4 passed

Passed Failed Skipped Contracts Duration
4 0 0 6 ✓ · 0 ✕ · 1 ⚠ 2.1s
1 contract warning
  • DELETE /todos/{id} 204 (deleteTodo): Response 204 has no content definition for DELETE /todos/{id}

View full report →

Adds twd-lint and a lint:twd script, and runs it in CI right after
npm ci, so a broken TWD test fails in seconds instead of in the
browser run. The existing tests already pass it.
@github-actions

Copy link
Copy Markdown

✅ TWD: 4 passed

Passed Failed Skipped Contracts Duration
4 0 0 6 ✓ · 0 ✕ · 1 ⚠ 1.5s
1 contract warning
  • DELETE /todos/{id} 204 (deleteTodo): Response 204 has no content definition for DELETE /todos/{id}

View full report →

@kevinccbsg
kevinccbsg merged commit 876d7d4 into main Oct 18, 2026
1 check passed
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