Compare commits
4 Commits
Author | SHA1 | Date | |
---|---|---|---|
31bf1b27a4 | |||
a77def5844 | |||
2357699f3e | |||
01f5784488 |
2
package-lock.json
generated
2
package-lock.json
generated
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@pushrocks/qenv",
|
"name": "@pushrocks/qenv",
|
||||||
"version": "3.0.5",
|
"version": "3.0.7",
|
||||||
"lockfileVersion": 1,
|
"lockfileVersion": 1,
|
||||||
"requires": true,
|
"requires": true,
|
||||||
"dependencies": {
|
"dependencies": {
|
||||||
|
@ -1,6 +1,6 @@
|
|||||||
{
|
{
|
||||||
"name": "@pushrocks/qenv",
|
"name": "@pushrocks/qenv",
|
||||||
"version": "3.0.5",
|
"version": "3.0.7",
|
||||||
"private": false,
|
"private": false,
|
||||||
"description": "easy promised environments",
|
"description": "easy promised environments",
|
||||||
"main": "dist/index.js",
|
"main": "dist/index.js",
|
||||||
|
@ -17,10 +17,12 @@ tap.test('should create a new class', async () => {
|
|||||||
|
|
||||||
tap.test('key1 should be not be overwritten since it is already present', async () => {
|
tap.test('key1 should be not be overwritten since it is already present', async () => {
|
||||||
expect(process.env.key1).to.equal('original');
|
expect(process.env.key1).to.equal('original');
|
||||||
|
expect(qenvTestObject.getEnvVarOnDemand('key1')).to.equal('original');
|
||||||
});
|
});
|
||||||
|
|
||||||
tap.test('key2 should be read from Yml', async () => {
|
tap.test('key2 should be read from Yml', async () => {
|
||||||
expect(process.env.key2).to.equal('fromYml');
|
expect(process.env.key2).to.equal('fromYml');
|
||||||
|
expect(qenvTestObject.getEnvVarOnDemand('key2')).to.equal('fromYml');
|
||||||
});
|
});
|
||||||
|
|
||||||
tap.test('keyValueObjectArray should hold all retrieved values', async () => {
|
tap.test('keyValueObjectArray should hold all retrieved values', async () => {
|
||||||
|
@ -1,4 +1,5 @@
|
|||||||
import * as plugins from './qenv.plugins';
|
import * as plugins from './qenv.plugins';
|
||||||
|
plugins.smartlog.defaultLogger.enableConsole();
|
||||||
|
|
||||||
export interface IKeyValueObject {
|
export interface IKeyValueObject {
|
||||||
key: string;
|
key: string;
|
||||||
@ -188,5 +189,5 @@ export class Qenv {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
return missingEnvVars;
|
return missingEnvVars;
|
||||||
};
|
}
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user