Skip to content

Commit 7f60697

Browse files
committed
chore: remove unnecessary test-env-config Refs: KK-1539
1 parent ff9a912 commit 7f60697

4 files changed

Lines changed: 3 additions & 9 deletions

File tree

.eslintignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,3 @@
11
src/domain/api/generatedTypes/graphql.tsx
22
build/*
33
public/env-config.js
4-
public/test-env-config.js

.gitignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,6 @@
1313

1414
# runtime env config generated by scripts/update-runtime-env.ts
1515
public/env-config.js
16-
public/test-env-config.js
1716

1817
# misc
1918
.DS_Store

.prettierignore

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -2,4 +2,3 @@
22
graphql.ts
33
graphql.tsx
44
public/env-config.js
5-
public/test-env-config.js

scripts/update-runtime-env.ts

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,7 @@ import dotenv from 'dotenv';
88

99
const __dirname = path.dirname(fileURLToPath(import.meta.url));
1010

11-
const USE_TEST_ENV = process.env.NODE_ENV === 'test';
12-
const defaultNodeEnv = USE_TEST_ENV ? 'test' : 'development';
11+
const defaultNodeEnv = 'development';
1312

1413
const env = {
1514
NODE_ENV: process.env.NODE_ENV || defaultNodeEnv,
@@ -19,9 +18,7 @@ dotenv.config({
1918
processEnv: env,
2019
// Loaded in order; later files override earlier ones (matches Vite's
2120
// .env precedence where *.local overrides the base file).
22-
...(USE_TEST_ENV
23-
? { path: ['.env', '.env.test', '.env.test.local'] }
24-
: { path: ['.env', '.env.local'] }),
21+
path: ['.env', '.env.local'],
2522
override: true,
2623
});
2724

@@ -41,7 +38,7 @@ const publicEnv = Object.fromEntries(
4138
);
4239

4340
// Prevent collision if app is running while tests are started
44-
const configFile = USE_TEST_ENV ? 'test-env-config.js' : 'env-config.js';
41+
const configFile = 'env-config.js';
4542

4643
const configurationFile: string = path.join(
4744
__dirname,

0 commit comments

Comments
 (0)