From 95e93463e917a7bc019549958749961422a7d4bb Mon Sep 17 00:00:00 2001 From: wf9a5m75 Date: Thu, 25 Oct 2018 17:52:50 -0700 Subject: [PATCH] Add www/BaseClass.spec.js --- www/BaseClass.spec.js | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) create mode 100644 www/BaseClass.spec.js diff --git a/www/BaseClass.spec.js b/www/BaseClass.spec.js new file mode 100644 index 000000000..3d63e4624 --- /dev/null +++ b/www/BaseClass.spec.js @@ -0,0 +1,17 @@ +const BaseClass = require('./BaseClass'); + +describe('BaseClass', () => { + let instanceA = new BaseClass(); + let instanceB = new BaseClass(); + + it('"instanceA.hello" should be "world"', () => { + instanceA.set('hello', 'world'); + expect(instanceA.get('hello')).toEqual('world'); + }); + + it('"instanceB.anotherHello" should be the same as "instanceA.hello"', () => { + instanceA.bindTo('hello', instanceB, 'anotherHello'); + expect(instanceB.get('anotherHello')).toEqual('world'); + }); + +});