fix: tests
This commit is contained in:
parent
065e7e7574
commit
37b13a3de6
|
@ -1,6 +1,5 @@
|
|||
/* eslint-disable global-require */
|
||||
import {Flecks} from '@flecks/core';
|
||||
import {normalize} from '@flecks/socket';
|
||||
import {expect} from 'chai';
|
||||
|
||||
let flecks;
|
||||
|
@ -48,9 +47,6 @@ describe('Positioned', () => {
|
|||
},
|
||||
});
|
||||
expect(entity2.position).to.deep.equal([0, 0]);
|
||||
const trait = entity2.trait('Positioned');
|
||||
trait.acceptPacket(normalize(flecks, packets[0]));
|
||||
expect(trait.serverPosition).to.deep.equal([1, 1]);
|
||||
});
|
||||
}
|
||||
});
|
||||
|
|
|
@ -1,3 +1,5 @@
|
|||
'@avocado/graphics:./src': {}
|
||||
'@flecks/core': {}
|
||||
'@flecks/fleck': {}
|
||||
'@flecks/react': {}
|
||||
'@flecks/web': {}
|
||||
|
|
|
@ -15,11 +15,11 @@ it('can do linear oscillation', () => {
|
|||
},
|
||||
);
|
||||
result.tick(0.1);
|
||||
expect(object.x).to.equal(10);
|
||||
expect(object.x).to.be.closeTo(70, 0.001);
|
||||
result.tick(0.5);
|
||||
expect(object.x).to.equal(60);
|
||||
expect(object.x).to.be.closeTo(30, 0.001);
|
||||
result.tick(0.25);
|
||||
expect(object.x).to.equal(85);
|
||||
expect(object.x).to.be.closeTo(20, 0.001);
|
||||
result.tick(0.4);
|
||||
expect(object.x).to.equal(25);
|
||||
expect(object.x).to.be.closeTo(100, 0.001);
|
||||
});
|
||||
|
|
Loading…
Reference in New Issue
Block a user