forked from calcom/cal.com
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathvitest.config.ts
More file actions
22 lines (19 loc) · 745 Bytes
/
vitest.config.ts
File metadata and controls
22 lines (19 loc) · 745 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
import { defineConfig } from "vitest/config";
process.env.INTEGRATION_TEST_MODE = "true";
export default defineConfig({
test: {
coverage: {
provider: "v8",
},
passWithNoTests: true,
testTimeout: 500000,
},
});
setEnvVariablesThatAreUsedBeforeSetup();
function setEnvVariablesThatAreUsedBeforeSetup() {
// We can't set it during tests because it is used as soon as _metadata.ts is imported which happens before tests start running
process.env.DAILY_API_KEY = "MOCK_DAILY_API_KEY";
// With same env variable, we can test both non org and org booking scenarios
process.env.NEXT_PUBLIC_WEBAPP_URL = "http://app.cal.local:3000";
process.env.CALCOM_SERVICE_ACCOUNT_ENCRYPTION_KEY = "UNIT_TEST_ENCRYPTION_KEY";
}