We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 8fa1c45 commit ff34567Copy full SHA for ff34567
test/unit/config.js
@@ -2,7 +2,26 @@ const Lab = require('lab');
2
const Code = require('code');
3
const Proxyquire = require('proxyquire').noPreserveCache();
4
5
-const Config = require('../../config');
+const Config = Proxyquire('../../config', {
6
+ 'dotenv': {
7
+ config: () => {
8
+ // set environment variables that should be in .env file
9
+ [
10
+ 'GITHUB_CLIENT_SECRET',
11
+ 'GITHUB_CLIENT_ID',
12
+ 'GITHUB_CALLBACK',
13
+ 'BELL_COOKIE_PASS',
14
+ 'COOKIE_PASS',
15
+ 'BROWSERSCOPE',
16
+ 'MYSQL_USER',
17
+ 'MYSQL_PASSWORD',
18
+ 'MYSQL_DATABASE'
19
+ ].map((k) => {
20
+ process.env[k] = k;
21
+ });
22
+ }
23
24
+});
25
26
const lab = exports.lab = Lab.script();
27
0 commit comments