Skip to content

Commit 813f14d

Browse files
author
Rudy Weber
committed
test custom prefix
1 parent 09e0f8e commit 813f14d

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

test/testdata/ENV.json

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,7 @@
55
"PLATFORM_TREE_ID": "abc123",
66
"PLATFORM_PROJECT_ENTROPY": "def789",
77

8-
"SOME_VARIABLE": "some value"
8+
"SOME_VARIABLE": "some value",
9+
10+
"CUSTOM_PREFIX_VARIABLE_WITH_CUSTOM_PREFIX": "with custom prefix"
911
}

test/tests.js

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -306,6 +306,16 @@ describe("Config tests", () => {
306306

307307
assert.equal(value['somevar'], 'someval');
308308
});
309+
310+
it('return a variable with a custom prefix', () => {
311+
const c = new psh.Config(mockEnvironmentRuntime, "CUSTOM_PREFIX_");
312+
313+
const withCustomPrefix = c._getValue("variable_with_custom_prefix");
314+
const hasNoCustomPrefix = c._getValue("somevar");
315+
316+
assert.equal(withCustomPrefix, "with custom prefix");
317+
assert.equal(hasNoCustomPrefix, null);
318+
});
309319
});
310320

311321
describe("Application tests", () => {

0 commit comments

Comments
 (0)