Skip to content

Commit 702d807

Browse files
committed
Add typecheck to all test scripts
- Run tsc --noEmit before tests in all examples - Ensures TypeScript errors are caught in CI - Provides consistency across all test runners
1 parent d0497aa commit 702d807

5 files changed

Lines changed: 5 additions & 5 deletions

File tree

inversify-jest/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"private": true,
55
"description": "Suites InversifyJS + Jest Example",
66
"scripts": {
7-
"test": "jest"
7+
"test": "tsc --noEmit && jest"
88
},
99
"dependencies": {
1010
"inversify": "^6.0.3",

inversify-sinon/src/user.sociable.spec.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -24,7 +24,7 @@ describe('UserService - Sociable Tests', () => {
2424
.compile();
2525

2626
userService = unit;
27-
database = unitRef.get(DATABASE_TOKEN);
27+
database = unitRef.get<Database>(DATABASE_TOKEN);
2828
});
2929

3030
it('should validate and create user with real validation logic', async () => {

inversify-vitest/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"type": "module",
66
"description": "Suites InversifyJS + Vitest Example",
77
"scripts": {
8-
"test": "vitest run"
8+
"test": "tsc --noEmit && vitest run"
99
},
1010
"dependencies": {
1111
"inversify": "^6.0.3",

nestjs-jest/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@
44
"private": true,
55
"description": "Suites NestJS + Jest Example",
66
"scripts": {
7-
"test": "jest"
7+
"test": "tsc --noEmit && jest"
88
},
99
"dependencies": {
1010
"@nestjs/common": "^10.4.15",

nestjs-vitest/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"type": "module",
66
"description": "Suites NestJS + Vitest Example",
77
"scripts": {
8-
"test": "vitest run"
8+
"test": "tsc --noEmit && vitest run"
99
},
1010
"dependencies": {
1111
"@nestjs/common": "^10.4.15",

0 commit comments

Comments
 (0)