2015-11-26 05:31:31 +00:00
|
|
|
/// <reference path="typings/tsd.d.ts" />
|
|
|
|
var smartenv = require("./index.js");
|
|
|
|
var beautylog = require("beautylog")("os");
|
|
|
|
beautylog.info("Now testing the smartenv module");
|
2015-11-28 13:36:47 +00:00
|
|
|
smartenv.info.print();
|
|
|
|
beautylog.info("Now testing the smartenv module");
|
2015-11-26 05:31:31 +00:00
|
|
|
smartenv.register({ key1: "Peter" }, "docit");
|
2015-11-28 13:36:47 +00:00
|
|
|
smartenv.info.print();
|
2015-11-26 05:31:31 +00:00
|
|
|
beautylog.log(smartenv.get("docit").key1);
|
|
|
|
smartenv.makeGlobal();
|
|
|
|
beautylog.log(global.smartenv.get("docit").key1);
|
2015-11-28 13:49:44 +00:00
|
|
|
var key2 = "hello";
|
|
|
|
smartenv.get("docit").key2 = key2;
|
|
|
|
beautylog.log(global.smartenv.get("docit").key2);
|
2015-11-26 05:31:31 +00:00
|
|
|
beautylog.success("Success!");
|