Skip to content

Commit

Permalink
ignore tests and mocks in compilation
Browse files Browse the repository at this point in the history
  • Loading branch information
choden-dev committed Mar 7, 2024
1 parent c9a0268 commit 4aef54c
Show file tree
Hide file tree
Showing 7 changed files with 9 additions and 23 deletions.
2 changes: 1 addition & 1 deletion server/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,7 @@
"start": "./node_modules/.bin/concurrently \"yarn nodemon -e ts,js --exec \" \"yarn tsoa spec-and-routes && yarn --cwd=\"../..\" workspace client generate-types\"",
"tsoa": "./node_modules/.bin/tsoa",
"nodemon": "../node_modules/.bin/nodemon",
"build": "tsc",
"build": "tsc -p ./tsconfig.prod.json",
"serve": "node dist/index.js"
}
}
2 changes: 1 addition & 1 deletion server/src/data-layer/adapters/FirestoreCollections.ts
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,7 @@ import {
EMULATOR_FIRESTORE_PORT,
EMULATOR_HOST,
EMULATOR_PROJECT_ID
} from "test-config/TestConfig"
} from "./EmulatorConfig"

if (process.env.DEV || process.env.JEST_WORKER_ID !== undefined) {
initializeApp({ projectId: EMULATOR_PROJECT_ID })
Expand Down
2 changes: 1 addition & 1 deletion server/src/data-layer/services/UserService.test.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
import { additionalInfoMock } from "test-config/mocks/UserMocks"
import { additionalInfoMock } from "test-config/mocks/User.mock"
import UserService from "./UserService"
import { cleanFirestore } from "test-config/TestUtils"

Expand Down
3 changes: 0 additions & 3 deletions server/src/test-config/TestConfig.ts

This file was deleted.

2 changes: 1 addition & 1 deletion server/src/test-config/TestUtils.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ import {
EMULATOR_FIRESTORE_PORT,
EMULATOR_HOST,
EMULATOR_PROJECT_ID
} from "./TestConfig"
} from "data-layer/adapters/EmulatorConfig"

export async function cleanFirestore() {
const response = await fetch(
Expand Down
15 changes: 0 additions & 15 deletions server/src/test-config/mocks/UserMocks.ts

This file was deleted.

6 changes: 5 additions & 1 deletion server/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@
"experimentalDecorators": true,
"resolveJsonModule": true
},
"include": ["src/**/*", "src/business-layer/security/FirebaseAuth.ts"],
"include": [
"src/**/*",
"src/business-layer/security/FirebaseAuth.ts",
"src/data-layer/adapters/EmulatorConfig.ts"
],
"exclude": ["node_modules", "dist", "src/middleware/__generated__/routes.ts"]
}

0 comments on commit 4aef54c

Please sign in to comment.