Skip to content

Commit c47dfd7

Browse files
committed
Add env variable for unit test
1 parent bced64b commit c47dfd7

2 files changed

Lines changed: 3 additions & 1 deletion

File tree

server/_jest-setup_/utils/env-setup.js

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,8 @@ process.env.JWT_SECRET_KEY = "testingSecretKey";
99
process.env.CLIENT_URL = "http://localhost:3001";
1010
process.env.SERVER_URL = "http://localhost:5002";
1111

12+
process.env.ALLOWED_ADMIN_EMAIL_DOMAINS = "dispostable.com,hackforla.org";
13+
1214
process.env.SENDGRID_API_KEY = "SG.testAPIkey";
1315
process.env.EMAIL_SENDER = "tdm+sendgrid@test.org";
1416
process.env.EMAIL_PUBLIC_COMMENT_LA_CITY =

server/app/services/account.service.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const {
77
sendRegistrationConfirmation,
88
sendResetPasswordConfirmation
99
} = require("./email.service");
10-
const allowedAdminDomains = process.env.ALLOWED_ADMIN_EMAIL_DOMAINS;
10+
const allowedAdminDomains = process.env.ALLOWED_ADMIN_EMAIL_DOMAINS.split(",");
1111

1212
const SALT_ROUNDS = 10;
1313

0 commit comments

Comments
 (0)