Skip to content

Commit d70869b

Browse files
committed
CCM-8580: add env vars in test setup
1 parent 4f2afd2 commit d70869b

File tree

3 files changed

+8
-1
lines changed

3 files changed

+8
-1
lines changed

frontend/jest.setup.ts

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,6 @@ import 'whatwg-fetch';
1313
Object.assign(global, { TextDecoder, TextEncoder });
1414

1515
createMocks();
16+
17+
// set feature flag
18+
process.env.NEXT_PUBLIC_ENABLE_LETTERS = 'true';

scripts/create-env-file.ts

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,4 +3,7 @@ import { randomBytes } from 'node:crypto';
33

44
const secret = process.env.CSRF_SECRET ?? randomBytes(16).toString('hex');
55

6-
writeFileSync('./frontend/.env', `CSRF_SECRET=${secret}`);
6+
writeFileSync(
7+
'./frontend/.env',
8+
[`CSRF_SECRET=${secret}`, 'NEXT_PUBLIC_ENABLE_LETTERS=true'].join('\n')
9+
);

tests/test-team/config/component/component.config.ts

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ const buildCommand = [
66
'INCLUDE_AUTH_PAGES=true',
77
'NEXT_PUBLIC_TIME_TILL_LOGOUT_SECONDS=25',
88
'NEXT_PUBLIC_PROMPT_SECONDS_BEFORE_LOGOUT=5',
9+
'NEXT_PUBLIC_ENABLE_LETTERS=true',
910
'npm run build && npm run start',
1011
].join(' ');
1112

0 commit comments

Comments
 (0)