40 lines
1.1 KiB
JavaScript
40 lines
1.1 KiB
JavaScript
|
// describe('@avocado/math', () => {
|
||
|
// describe('Vector.Mixin', () => {
|
||
|
// var O, spy;
|
||
|
// O = null;
|
||
|
// spy = null;
|
||
|
// beforeEach(() => {
|
||
|
// O = new ((function(_super) {
|
||
|
// __extends(_Class, _super);
|
||
|
|
||
|
// function _Class() {
|
||
|
// return _Class.__super__.constructor.apply(this, arguments);
|
||
|
// }
|
||
|
|
||
|
// return _Class;
|
||
|
|
||
|
// })(MixinOf(EventEmitter, Vector.Mixin())));
|
||
|
// return spy = jasmine.createSpy('listener');
|
||
|
// });
|
||
|
// it('can detect changes', () => {
|
||
|
// O.on('xChanged', spy);
|
||
|
// O.on('yChanged', spy);
|
||
|
// O.on('vectorChanged', spy);
|
||
|
// O.setVector([20, 20]);
|
||
|
// return expect(spy.callCount).toEqual(3);
|
||
|
// });
|
||
|
// return it('can detect changes in the correct order', () => {
|
||
|
// var accum;
|
||
|
// accum = 300;
|
||
|
// O.on('xChanged yChanged', () => {
|
||
|
// return accum /= 10;
|
||
|
// });
|
||
|
// O.on('vectorChanged', () => {
|
||
|
// return accum += 200;
|
||
|
// });
|
||
|
// O.setVector([20, 20]);
|
||
|
// return expect(accum).toEqual(203);
|
||
|
// });
|
||
|
// });
|
||
|
// });
|