Skip to content

Commit 609a8e0

Browse files
committed
Ignore tests when building
1 parent 3cb25ed commit 609a8e0

File tree

4 files changed

+8
-2
lines changed

4 files changed

+8
-2
lines changed

frontend/package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
"type": "module",
66
"scripts": {
77
"dev": "vite",
8-
"build": "tsc && vite build",
8+
"build": "tsc -p tsconfig.build.json && vite build",
99
"lint": "biome check --apply-unsafe --no-errors-on-unmatched --files-ignore-unknown=true ./",
1010
"preview": "vite preview",
1111
"generate-client": "openapi-ts"

frontend/tests/utils/privateApi.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
1-
// @ts-ignore
1+
// Note: the `PrivateService` is only available when generating the client
2+
// for local environments
23
import { OpenAPI, PrivateService } from "../../src/client"
34

45
OpenAPI.BASE = `${process.env.VITE_API_URL}`

frontend/tsconfig.build.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,4 @@
1+
{
2+
"extends": "./tsconfig.json",
3+
"exclude": ["tests/**/*.ts"]
4+
}

frontend/tsconfig.json

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -21,5 +21,6 @@
2121
"noFallthroughCasesInSwitch": true
2222
},
2323
"include": ["src/**/*.ts", "tests/**/*.ts", "playwright.config.ts"],
24+
"exclude": ["tests/utils/privateApi.ts"],
2425
"references": [{ "path": "./tsconfig.node.json" }]
2526
}

0 commit comments

Comments
 (0)