This repository has been archived by the owner on Jun 12, 2022. It is now read-only.
-
-
Notifications
You must be signed in to change notification settings - Fork 27
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
fix(agent): check uppercase & lowercase proxy env (#24)
Fixes #22
- Loading branch information
Showing
2 changed files
with
44 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
'use strict' | ||
|
||
const test = require('tap').test | ||
const getProcessEnv = require('../agent').getProcessEnv | ||
|
||
test('extracts process env variables', t => { | ||
process.env = { TEST_ENV: 'test', ANOTHER_ENV: 'no' } | ||
|
||
t.deepEqual(getProcessEnv('test_ENV'), 'test', 'extracts single env') | ||
|
||
t.deepEqual( | ||
getProcessEnv(['not_existing_env', 'test_ENV', 'another_env']), | ||
'test', | ||
'extracts env from array of env names' | ||
) | ||
t.done() | ||
}) |