Add testing infrastructure with vitest (#67)

- Add vitest as dev dependency
- Add test scripts: `npm test` (watch) and `npm run test:run` (CI)
- Add initial unit tests for pure utility functions:
  - src/utils/phone.test.ts (10 tests)
  - src/utils/server.test.ts (10 tests)
  - src/channels/attachments.test.ts (6 tests)

All 26 tests passing.

Written by Cameron ◯ Letta Code
This commit is contained in:
Cameron
2026-02-01 22:38:25 -08:00
committed by GitHub
parent 67f0550bd3
commit f3e619cd7b
5 changed files with 1567 additions and 2 deletions

View File

@@ -14,6 +14,8 @@
"dev": "tsx src/main.ts",
"build": "tsc",
"start": "node dist/main.js",
"test": "vitest",
"test:run": "vitest run",
"skills": "tsx src/cli.ts skills",
"skills:list": "tsx src/cli.ts skills list",
"skills:status": "tsx src/cli.ts skills status",
@@ -64,6 +66,7 @@
"discord.js": "^14.25.1"
},
"devDependencies": {
"@types/update-notifier": "^6.0.8"
"@types/update-notifier": "^6.0.8",
"vitest": "^4.0.18"
}
}