Files
julian 155f034f61 Exclude integration tests from default pnpm test; opt-in via test:integration
The Redis-publisher integration test uses testcontainers to spin up a real
Redis. On the Gitea CI runner, `container.start()` hangs (likely image-pull
delay or restricted Docker access), and the 60s beforeAll timeout fails the
suite even though both tests ultimately would skip. The skip-on-error path
only fires when start() throws, not when it times out.

Fix: separate unit tests (default) from integration tests (opt-in). The
default `pnpm test` now runs only `test/**/*.test.ts` excluding
`*.integration.test.ts`. A new `pnpm test:integration` script runs them
via `vitest.integration.config.ts` with generous hook/test timeouts for
container startup.

CI runs `pnpm test` and is unaffected by Docker availability. Integration
tests can be run locally or in a future CI job that explicitly provisions
Docker.
2026-04-30 17:38:48 +02:00

42 lines
1.2 KiB
JSON

{
"name": "tcp-ingestion",
"version": "0.1.0",
"description": "TCP server ingesting Teltonika GPS telemetry and publishing normalized Position records to Redis Streams",
"type": "module",
"engines": {
"node": ">=22"
},
"scripts": {
"build": "tsc --project tsconfig.json",
"dev": "tsx watch src/main.ts",
"start": "node dist/main.js",
"test": "vitest run",
"test:watch": "vitest",
"test:integration": "vitest run --config vitest.integration.config.ts",
"lint": "eslint .",
"format": "prettier --write .",
"typecheck": "tsc --noEmit"
},
"dependencies": {
"ioredis": "^5.3.2",
"pino": "^9.5.0",
"prom-client": "^15.1.3",
"zod": "^3.23.8"
},
"devDependencies": {
"@types/node": "^22.10.0",
"@typescript-eslint/eslint-plugin": "^8.19.0",
"@typescript-eslint/parser": "^8.19.0",
"@vitest/coverage-v8": "^2.1.8",
"eslint": "^9.17.0",
"eslint-import-resolver-typescript": "^4.4.4",
"eslint-plugin-import": "^2.31.0",
"pino-pretty": "^13.0.0",
"prettier": "^3.4.2",
"testcontainers": "^11.14.0",
"tsx": "^4.19.2",
"typescript": "^5.7.2",
"vitest": "^2.1.8"
}
}