Unnamed repository; edit this file 'description' to name the repository.
Diffstat (limited to 'editors/code/tests/unit/settings.test.ts')
| -rw-r--r-- | editors/code/tests/unit/settings.test.ts | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/editors/code/tests/unit/settings.test.ts b/editors/code/tests/unit/settings.test.ts index 12734d1566..f4b022b421 100644 --- a/editors/code/tests/unit/settings.test.ts +++ b/editors/code/tests/unit/settings.test.ts @@ -37,5 +37,17 @@ export async function getTests(ctx: Context) { const actualEnv = await substituteVariablesInEnv(envJson); assert.deepStrictEqual(actualEnv, expectedEnv); }); + + suite.addTest('Should support external variables', async () => { + const envJson = { + USING_EXTERNAL_VAR: "${env:TEST_VARIABLE} test ${env:TEST_VARIABLE}" + }; + const expectedEnv = { + USING_EXTERNAL_VAR: "test test test" + }; + + const actualEnv = await substituteVariablesInEnv(envJson); + assert.deepStrictEqual(actualEnv, expectedEnv); + }); }); } |