Comparing version 5.1.0 to 5.1.1
@@ -74,3 +74,3 @@ /* | ||
if (key in obj) { | ||
throw new Error('Unsupported combination of public and non-public properties, check your tree structure'); | ||
throw new Error('Unsupported combination of public and non-public properties for key "' + key + '", check your tree structure: ' + JSON.stringify(obj)); | ||
} | ||
@@ -77,0 +77,0 @@ |
@@ -5,3 +5,3 @@ { | ||
"description": "Configuration", | ||
"version": "5.1.0", | ||
"version": "5.1.1", | ||
"repository": { | ||
@@ -8,0 +8,0 @@ "type": "git", |
@@ -441,3 +441,65 @@ /*global describe, it, before*/ | ||
}); | ||
it.skip('should allow overwriting a key inside a #public block with a #public-suffixed key of the same name', function () { | ||
return expect(function () { | ||
expect(oconf.load('/testdata/config.cjson'), 'to equal', { | ||
foo: { | ||
abc: 123 | ||
}, | ||
'#public': { | ||
foo: { | ||
abc: 123 | ||
} | ||
} | ||
}); | ||
}, 'with fs mocked out', { | ||
'/testdata': { | ||
'config.cjson': JSON.stringify({ | ||
'#include': '/testdata/included.cjson', | ||
foo: { | ||
'abc#public': 123 | ||
} | ||
}), | ||
'included.cjson': JSON.stringify({ | ||
foo: { | ||
'#public': { | ||
abc: 456 | ||
} | ||
} | ||
}) | ||
} | ||
}, 'not to error'); | ||
}); | ||
it.skip('should allow overwriting a #public-suffixed key with a key of the same name inside a #public block', function () { | ||
return expect(function () { | ||
expect(oconf.load('/testdata/config.cjson'), 'to equal', { | ||
foo: { | ||
abc: 123 | ||
}, | ||
'#public': { | ||
foo: { | ||
abc: 123 | ||
} | ||
} | ||
}); | ||
}, 'with fs mocked out', { | ||
'/testdata': { | ||
'config.cjson': JSON.stringify({ | ||
'#include': '/testdata/included.cjson', | ||
foo: { | ||
'#public': { | ||
abc: 123 | ||
} | ||
} | ||
}), | ||
'included.cjson': JSON.stringify({ | ||
foo: { | ||
'abc#public': 456 | ||
} | ||
}) | ||
} | ||
}, 'not to error'); | ||
}); | ||
}); | ||
}); |
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
67930
1085