Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/npm/cli.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'node_modules/config-chain/test/get.js')
-rw-r--r--node_modules/config-chain/test/get.js15
1 files changed, 15 insertions, 0 deletions
diff --git a/node_modules/config-chain/test/get.js b/node_modules/config-chain/test/get.js
new file mode 100644
index 000000000..d6fd79f74
--- /dev/null
+++ b/node_modules/config-chain/test/get.js
@@ -0,0 +1,15 @@
+var cc = require("../");
+
+var chain = cc()
+ , name = "forFun";
+
+chain
+ .add({
+ __sample:"for fun only"
+ }, name)
+ .on("load", function() {
+ //It throw exception here
+ console.log(chain.get("__sample", name));
+ //But if I drop the name param, it run normally and return as expected: "for fun only"
+ //console.log(chain.get("__sample"));
+ });