Comparing version 0.0.8 to 0.0.9
{ | ||
"name": "configya", | ||
"version": "0.0.8", | ||
"version": "0.0.9", | ||
"description": "Config files that defer to env settings.", | ||
@@ -5,0 +5,0 @@ "main": "src/configya.js", |
require( 'should' ); | ||
describe( 'when using deprecated API (calling get())', function() { | ||
@@ -50,3 +49,2 @@ describe( 'when loading config that doesn\'t exist', function() { | ||
describe( 'when loading valid config with environment variables', function() { | ||
@@ -170,2 +168,3 @@ var cfg; | ||
} ); | ||
describe( 'with deploy-type set to DEV for testing', function() { | ||
@@ -262,4 +261,25 @@ var cfg; | ||
} ); | ||
} ) | ||
} ); | ||
describe( 'with empty default property', function() { | ||
var cfg; | ||
before( function() { | ||
cfg = require( '../src/configya.js' )( | ||
{ | ||
integration: { | ||
agent: { | ||
loglevel: 'info', | ||
id: 'p6-test' | ||
} | ||
} | ||
}, | ||
'./spec/test.json' ); | ||
} ); | ||
it( 'should not overwrite root property', function() { | ||
cfg.integration.agent.id.should.equal( 'test123' ); | ||
cfg.integration.agent.loglevel.should.equal( 'trace' ); | ||
} ); | ||
} ); | ||
after( function() { | ||
@@ -266,0 +286,0 @@ delete process.env[ 'test_redis_port' ]; |
{ | ||
"test-key": "hulloo", | ||
"override-me": "you will see this only when you have deploy-type set to 'DEV'", | ||
"NESTED_KEY": "a test of nested keys from files" | ||
"NESTED_KEY": "a test of nested keys from files", | ||
"INTEGRATION_AGENT_LOGLEVEL": "trace", | ||
"INTEGRATION_AGENT_ID": "test123" | ||
} |
@@ -23,3 +23,3 @@ var fs = require( 'fs' ); | ||
} else { | ||
var child = target[ key ] || {}; | ||
var child = target[ k ] || {}; | ||
target[ k ] = child; | ||
@@ -26,0 +26,0 @@ ensurePath( child, val, paths ); |
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
14888
326