Skip to content

test: run full test suite in npm test, not just smoke tests#19

Open
dmchaledev wants to merge 1 commit into
mainfrom
claude/sleepy-rubin-6ktx1h
Open

test: run full test suite in npm test, not just smoke tests#19
dmchaledev wants to merge 1 commit into
mainfrom
claude/sleepy-rubin-6ktx1h

Conversation

@dmchaledev

Copy link
Copy Markdown
Contributor

Problem

The npm test script only ran test/smoke.test.mjs:

"test": "node --test test/smoke.test.mjs"

That executes just 6 smoke tests. The comprehensive 59-test test/calculate.test.mjs suite (added in #9, covering VM sizing, timing, costs, ROI, recommendations, and edge cases) was never run by CI, because CI invokes npm test.

Commit dafee26 claimed the test script was "updated to glob," but package.json still pointed at the single smoke file — so the calculation suite has been silently uncovered on every push and PR since.

Fix

Switch the test script to a glob so all test files run:

"test": "node --test test/*.test.mjs"

Verification

Before — npm test:

# tests 6
# pass 6

After — npm test:

# tests 65
# suites 9
# pass 65
# fail 0

All 65 tests (6 smoke + 59 calculate) now pass and will run across the Node 18/20/22 CI matrix.

Note: the directory form node --test test/ was rejected on Node 22, so the explicit glob is used.

https://claude.ai/code/session_01YCPuYtBp4RKGj2CqUp7Bq2


Generated by Claude Code

The npm test script ran only test/smoke.test.mjs (6 tests), so the
59-test calculate.test.mjs suite was never executed by CI. Switch to a
glob (test/*.test.mjs) so all 65 tests run on every push and PR.

https://claude.ai/code/session_01YCPuYtBp4RKGj2CqUp7Bq2
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