Skip to content

Commit bfb3973

Browse files
committed
Add comprehensive API tests for health, performance, projects, search, specs, stats, and validation endpoints
- Implement health endpoint tests to verify connectivity and response structure. - Create performance tests to measure response times and handle concurrent requests. - Develop project management tests covering CRUD operations and schema validation. - Add search endpoint tests to validate query handling and filtering capabilities. - Implement specs endpoint tests to ensure correct retrieval and filtering of specs. - Create stats endpoint tests to validate response structure and data integrity. - Add validation endpoint tests to check schema compliance and error handling. - Introduce custom assertion utilities for improved test readability and maintainability. - Configure TypeScript and Vitest for the test suite.
1 parent cde5eef commit bfb3973

34 files changed

+111
-40
lines changed

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,7 @@
1313
"build": "turbo run build",
1414
"build:rust": "cd rust && cargo build --release && cd .. && node scripts/copy-rust-binaries.mjs",
1515
"test": "turbo run test",
16-
"test:api": "turbo run test:api --filter=@leanspec/api-contracts",
16+
"test:api": "turbo run test --filter=@leanspec/api-tests",
1717
"test:watch": "vitest",
1818
"test:ui": "vitest --ui",
1919
"test:coverage": "vitest run --coverage",

packages/http-server/package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@
77
"leanspec-http": "./bin/leanspec-http.js"
88
},
99
"scripts": {
10+
"dev": "nodemon --watch ./binaries --exec 'node ./bin/leanspec-http.js'",
1011
"typecheck": "echo 'No TypeScript source to check'"
1112
},
1213
"keywords": [
@@ -42,5 +43,8 @@
4243
},
4344
"engines": {
4445
"node": ">=20"
46+
},
47+
"devDependencies": {
48+
"nodemon": "^3.1.11"
4549
}
4650
}

0 commit comments

Comments
 (0)