Skip to content

Commit f034be7

Browse files
committed
env var management
1 parent 0c1ffd8 commit f034be7

2 files changed

Lines changed: 6 additions & 3 deletions

File tree

package.json

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@
88
"build": "next build",
99
"start": "next start",
1010
"lint": "next lint",
11-
"test": "env -u TWILIO_API_KEY -u TWILIO_API_SECRET -u TWILIO_ACCOUNT_SID DOTENV_CONFIG_PATH=./.env.local vitest",
12-
"test:e2e": "env -u TWILIO_API_KEY -u TWILIO_API_SECRET -u TWILIO_ACCOUNT_SID playwright test --retries=2",
11+
"test": "DOTENV_CONFIG_OVERRIDE=true DOTENV_CONFIG_PATH=./.env.local vitest",
12+
"test:e2e": "playwright test --retries=2",
1313
"update-config": "tsx -r dotenv/config src/scripts/updateConfig dotenv_config_path=.env.local ",
1414
"download": "tsx -r dotenv/config src/scripts/download dotenv_config_path=.env.local ",
1515
"create-twilio-res": "tsx -r dotenv/config src/scripts/createTwilioRes dotenv_config_path=.env.local ",

playwright.config.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,10 @@
11
import { defineConfig, devices } from "@playwright/test";
22
import path from "path";
33

4-
require("dotenv").config({ path: path.resolve(process.cwd(), ".env.local") });
4+
require("dotenv").config({
5+
path: path.resolve(process.cwd(), ".env.local"),
6+
override: true,
7+
});
58
// Use process.env.PORT by default and fallback to port 3000
69
const PORT = process.env.PORT || 3000;
710

0 commit comments

Comments
 (0)