update tests

This commit is contained in:
Philipp Kunz 2016-11-21 12:04:57 +01:00
parent 340e7716f0
commit 81eaaaca90
3 changed files with 6 additions and 8 deletions

3
test/test.d.ts vendored
View File

@ -1,3 +0,0 @@
declare let smartenv: any;
declare let beautylog: any;
declare let key2: string;

View File

@ -1,9 +1,10 @@
let smartenv = require('../dist/index.js'); "use strict";
let beautylog = require('beautylog'); const smartenv = require("../dist/index.js");
const beautylog = require("beautylog");
smartenv.printEnv(); smartenv.printEnv();
// test smartenv.obs.add // test smartenv.obs.add
smartenv.obs.add('myTestObject', { key1: 'Peter' }); smartenv.obs.add('myTestObject', { key1: 'Peter' });
smartenv.obs.add('myTestObject', { key1: 'Klaus' }); //now trying to add a second smartenv.obs.add('myTestObject', { key1: 'Klaus' }); // now trying to add a second
smartenv.printEnv(); smartenv.printEnv();
beautylog.log(smartenv.obs.get('myTestObject').key1); // this should be Peter beautylog.log(smartenv.obs.get('myTestObject').key1); // this should be Peter
// test smartenv.obs.replace // test smartenv.obs.replace
@ -17,4 +18,4 @@ let key2 = 'hello';
smartenv.obs.get('myTestObject').key2 = key2; smartenv.obs.get('myTestObject').key2 = key2;
beautylog.log(smartenv.obs.get('myTestObject').key2); beautylog.log(smartenv.obs.get('myTestObject').key2);
beautylog.success('Success!'); beautylog.success('Success!');
//# sourceMappingURL=data:application/json;base64,eyJ2ZXJzaW9uIjozLCJmaWxlIjoidGVzdC5qcyIsInNvdXJjZVJvb3QiOiIiLCJzb3VyY2VzIjpbInRlc3QudHMiXSwibmFtZXMiOltdLCJtYXBwaW5ncyI6IkFBQUEsSUFBSSxRQUFRLEdBQUcsT0FBTyxDQUFDLGtCQUFrQixDQUFDLENBQUE7QUFDMUMsSUFBSSxTQUFTLEdBQUcsT0FBTyxDQUFDLFdBQVcsQ0FBQyxDQUFBO0FBQ3BDLFFBQVEsQ0FBQyxRQUFRLEVBQUUsQ0FBQTtBQUVuQix3QkFBd0I7QUFDeEIsUUFBUSxDQUFDLEdBQUcsQ0FBQy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ENBQUMsR0FBRyxDQUFDLEdBQUcsQ0FBQyxjQUFjLENBQUMsQ0FBQyxJQUFJLENBQUMsQ0FBQSxDQUFDLHVCQUF1QjtBQUU1RSwwQkFBMEI7QUFDMUIsUUFBUSxDQUFDLEdBQUcsQ0FBQyxLQUFLLENBQUMsY0FBYyxFQUFDLEVBQUMsSUFBSSxFQUFDLE9BQU8sRUFBQyxDQUFDLENBQUE7QUFDakQsU0FBUyxDQUFDLEdBQUcsQ0FBQyxRQUFRLENBQUMsR0FBRyxDQUFDLEdBQUcsQ0FBQyxjQUFjLENBQUMsQ0FBQyxJQUFJLEdBQUcsUUFBUSxDQUFDLEdBQUcsQ0FBQyxHQUFHLENBQUMsY0FBYyxDQUFDLENBQUMsSUFBSSxDQUFDLENBQUE7QUFDNUYsNEJBQTRCO0FBRTVCLElBQUksSUFBSSxHQUFHLE9BQU8sQ0FBQTtBQUNsQixRQUFRLENBQUMsR0FBRyxDQUFDLEdBQUcsQ0FBQyxjQUFjLENBQUMsQ0FBQyxJQUFJLEdBQUcsSUFBSSxDQUFBO0FBQzVDLFNBQVMsQ0FBQyxHQUFHLENBQUMsUUFBUSxDQUFDLEdBQUcsQ0FBQyxHQUFHLENBQUMsY0FBYyxDQUFDLENBQUMsSUFBSSxDQUFDLENBQUE7QUFFcEQsU0FBUyxDQUFDLE9BQU8sQ0FBQyxVQUFVLENBQUMsQ0FBQSJ9

View File

@ -4,7 +4,7 @@ smartenv.printEnv()
// test smartenv.obs.add // test smartenv.obs.add
smartenv.obs.add('myTestObject',{key1:'Peter'}) smartenv.obs.add('myTestObject',{key1:'Peter'})
smartenv.obs.add('myTestObject',{key1:'Klaus'}) //now trying to add a second smartenv.obs.add('myTestObject',{key1:'Klaus'}) // now trying to add a second
smartenv.printEnv() smartenv.printEnv()
beautylog.log(smartenv.obs.get('myTestObject').key1) // this should be Peter beautylog.log(smartenv.obs.get('myTestObject').key1) // this should be Peter