configuration-master
Advanced tools
Comparing version 0.1.2 to 0.1.3
{ | ||
"name": "configuration-master", | ||
"version": "0.1.2", | ||
"version": "0.1.3", | ||
"description": "Simple configuration load/access tool.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
@@ -6,2 +6,11 @@ ## Configuration Master | ||
#### Release Notes | ||
v0.1.3 | ||
- add additional tests | ||
v0.1.2 | ||
- change loader to use path.resolve and require.main.filename | ||
v0.1.1 | ||
- add tests | ||
v0.1.0 | ||
@@ -11,5 +20,2 @@ - breaks .direct. functionality from earlier versions. | ||
v0.1.1 | ||
- add tests | ||
#### Installation | ||
@@ -16,0 +22,0 @@ |
@@ -10,3 +10,13 @@ const config = require('.'); | ||
fire: "hot", | ||
earth: "solid" | ||
earth: "solid", | ||
nested: { | ||
sub1: { | ||
suba: "something", | ||
subb: "deep" | ||
}, | ||
sub2: { | ||
dive: "down", | ||
water: "wetter" | ||
} | ||
} | ||
}; | ||
@@ -58,3 +68,20 @@ | ||
}); | ||
it('Test that nested objects work', () => | ||
{ | ||
expect.assertions(4); | ||
expect(config.namespace).not.toBeNull(); | ||
expect(config.namespace.nested).not.toBeNull(); | ||
expect(config.namespace.nested.sub2).not.toBeNull(); | ||
expect(config.namespace.nested.sub2.water).toBe("wetter"); | ||
}); | ||
it('Test that values can be set', () => | ||
{ | ||
expect.assertions(2); | ||
config.setValue("other", 27); | ||
config.setValue("otherValue", 36, "namespace"); | ||
expect(config.other).toBe(27); | ||
expect(config.namespace.otherValue).toBe(36); | ||
}); | ||
}); | ||
@@ -61,0 +88,0 @@ |
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
5879
159
69