We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 9e8bc8c commit 6a9ce8eCopy full SHA for 6a9ce8e
1 file changed
frontend/scripts/integration.test.mjs
@@ -3,11 +3,14 @@ import crypto from "node:crypto";
3
import { createClient } from "@supabase/supabase-js";
4
5
const required = ["TEST_TEACHER_EMAIL", "TEST_TEACHER_PASSWORD"];
6
+const missingCreds = required.filter((key) => !process.env[key]);
7
-for (const key of required) {
8
- if (!process.env[key]) {
9
- throw new Error(`Missing required env var: ${key}`);
+if (missingCreds.length > 0) {
+ if (process.env.CI === "true") {
10
+ console.log(`Skipping integration test: missing env vars ${missingCreds.join(", ")}`);
11
+ process.exit(0);
12
}
13
+ throw new Error(`Missing required env var: ${missingCreds[0]}`);
14
15
16
const supabaseUrlEnv = process.env.SUPABASE_URL ?? process.env.NEXT_PUBLIC_SUPABASE_URL ?? "";
0 commit comments