Run tests against a throwaway MariaDB Docker container
- Add scripts/test.ts: starts a temporary MariaDB container on a random localhost port, waits for TCP readiness, runs all test files, and always removes the container (including on Ctrl+C) - `bun run test` uses the script; `bun run test:unit` runs without a DB - BUN_MARIADB_TEST_IMAGE selects the image; an existing BUN_MARIADB_TEST_DB skips Docker - Document in README Co-Authored-By: Claude Opus 5.5 <[email protected]>
This commit is contained in:
+2
-1
@@ -29,7 +29,8 @@
|
||||
"dev": "tsc --watch",
|
||||
"compile": "rm -rf dist tsconfig.tsbuildinfo && tsc -p tsconfig.json && chmod +x dist/commands/index.js",
|
||||
"typecheck": "tsc -p tsconfig.json --noEmit",
|
||||
"test": "bun test tests",
|
||||
"test": "bun run scripts/test.ts",
|
||||
"test:unit": "bun test",
|
||||
"prepublishOnly": "bun run compile"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
||||
Reference in New Issue
Block a user