Skip to content

Commit cfd10e5

Browse files
committed
feat: add environment.test.ts generation and update test:ci command for code coverage
1 parent ce3deed commit cfd10e5

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@
99
"watch": "ng build --watch --configuration development",
1010
"build:test": "ng build --configuration test",
1111
"test": "ng test",
12-
"test:ci": "ng test --no-watch --no-progress --browsers=ChromeHeadless",
12+
"test:ci": "ng test --no-watch --no-progress --code-coverage --browsers=ChromeHeadless",
1313
"test:coverage": "ng test --coverage --watch=false",
1414
"e2e:test": "playwright test",
1515
"e2e:ui": "playwright test --ui",

scripts/setup-env.ts

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,10 +53,22 @@ const environmentProdTs = `export const environment = {
5353
};
5454
`;
5555

56+
// Generate environment.test.ts (testing)
57+
const environmentTestTs = `export const environment = {
58+
production: false,
59+
supabase: {
60+
url: '${SUPABASE_URL}',
61+
anonKey: '${SUPABASE_ANON_KEY}',
62+
},
63+
};
64+
`;
65+
5666
// Write files
5767
writeFileSync(join(environmentsDir, 'environment.ts'), environmentTs);
5868
writeFileSync(join(environmentsDir, 'environment.prod.ts'), environmentProdTs);
69+
writeFileSync(join(environmentsDir, 'environment.test.ts'), environmentTestTs);
5970

6071
console.log('✓ Environment files created successfully');
6172
console.log(` - ${join(environmentsDir, 'environment.ts')}`);
6273
console.log(` - ${join(environmentsDir, 'environment.prod.ts')}`);
74+
console.log(` - ${join(environmentsDir, 'environment.test.ts')}`);

0 commit comments

Comments
 (0)