Skip to content

Commit

Permalink
Ignore tests when building
Browse files Browse the repository at this point in the history
  • Loading branch information
patrick91 committed Nov 28, 2024
1 parent 3cb25ed commit 609a8e0
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 2 deletions.
2 changes: 1 addition & 1 deletion frontend/package.json
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@
"type": "module",
"scripts": {
"dev": "vite",
"build": "tsc && vite build",
"build": "tsc -p tsconfig.build.json && vite build",
"lint": "biome check --apply-unsafe --no-errors-on-unmatched --files-ignore-unknown=true ./",
"preview": "vite preview",
"generate-client": "openapi-ts"
Expand Down
3 changes: 2 additions & 1 deletion frontend/tests/utils/privateApi.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
// @ts-ignore
// Note: the `PrivateService` is only available when generating the client
// for local environments
import { OpenAPI, PrivateService } from "../../src/client"

OpenAPI.BASE = `${process.env.VITE_API_URL}`
Expand Down
4 changes: 4 additions & 0 deletions frontend/tsconfig.build.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
{
"extends": "./tsconfig.json",
"exclude": ["tests/**/*.ts"]
}
1 change: 1 addition & 0 deletions frontend/tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -21,5 +21,6 @@
"noFallthroughCasesInSwitch": true
},
"include": ["src/**/*.ts", "tests/**/*.ts", "playwright.config.ts"],
"exclude": ["tests/utils/privateApi.ts"],
"references": [{ "path": "./tsconfig.node.json" }]
}

0 comments on commit 609a8e0

Please sign in to comment.