fix(core): update

This commit is contained in:
2019-08-06 17:41:45 +02:00
parent a1aa1543a2
commit b54a5e2fef
4 changed files with 9 additions and 7 deletions

4
test/assets/env.json Normal file
View File

@ -0,0 +1,4 @@
{
"key1": "fromJson",
"key2" :"fromJson"
}

View File

@ -1,2 +0,0 @@
key1: fromYml
key2: fromYml

View File

@ -17,13 +17,13 @@ tap.test('key1 should be not be overwritten since it is already present', async
});
tap.test('key2 should be read from Yml', async () => {
expect(testQenv.getEnvVarRequired('key2')).to.equal('fromYml');
expect(testQenv.getEnvVarOnDemand('key2')).to.equal('fromYml');
expect(testQenv.getEnvVarRequired('key2')).to.equal('fromJson');
expect(testQenv.getEnvVarOnDemand('key2')).to.equal('fromJson');
});
tap.test('keyValueObjectArray should hold all retrieved values', async () => {
expect(testQenv.keyValueObject.key1).to.equal('original');
expect(testQenv.keyValueObject.key2).to.equal('fromYml');
expect(testQenv.keyValueObject.key2).to.equal('fromJson');
});
tap.start();