"tsx --test test/**/*.test.ts" worked locally (Node v22) and failed on the CI runner (node:20-alpine, Node v20) with: Could not find '.../server/test/**/*.test.ts' node --test only gained native glob-pattern CLI arguments around Node 21/22; on Node 20 the literal glob string is treated as a single filename and, unsurprisingly, not found. Same script, two Node majors, different behavior - not a shell/quoting issue (both runs go through tsx's own CLI, no shell glob expansion involved either way). Fixed by listing the four test files explicitly instead of relying on a glob whose CLI support turned out to vary across the exact two Node installs this project runs on (this dev machine, and node:20-alpine - the CI container and server/Dockerfile's runtime image, deliberately matched). engines.node is >=18, so relying on a 21/22-only feature was already a latent bug even before it showed up. Verified locally (all 25 tests still pass with the explicit list) - the actual node:20-alpine behavior will confirm on the next CI run. Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
27 lines
677 B
JSON
27 lines
677 B
JSON
{
|
|
"name": "watchparty-server",
|
|
"version": "0.1.0",
|
|
"private": true,
|
|
"type": "commonjs",
|
|
"main": "dist/index.js",
|
|
"scripts": {
|
|
"build": "tsc",
|
|
"start": "node dist/index.js",
|
|
"dev": "tsx watch src/index.ts",
|
|
"typecheck": "tsc -p tsconfig.test.json",
|
|
"test": "tsx --test test/catalogService.test.ts test/musicQueueService.test.ts test/partyService.test.ts test/socketGateway.test.ts"
|
|
},
|
|
"engines": {
|
|
"node": ">=18"
|
|
},
|
|
"dependencies": {
|
|
"express": "^4.19.2",
|
|
"socket.io": "^4.7.5"
|
|
},
|
|
"devDependencies": {
|
|
"@types/express": "^4.17.21",
|
|
"@types/node": "^20.14.2",
|
|
"tsx": "^4.16.2",
|
|
"typescript": "^5.5.3"
|
|
}
|
|
}
|