Skip to content

Commit

Permalink
Add www/BaseClass.spec.js
Browse files Browse the repository at this point in the history
  • Loading branch information
wf9a5m75 committed Oct 26, 2018
1 parent e3947c5 commit 95e9346
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions www/BaseClass.spec.js
Original file line number Diff line number Diff line change
@@ -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');
});

});

0 comments on commit 95e9346

Please sign in to comment.