improve tests

This commit is contained in:
Philipp Kunz 2017-07-05 14:37:26 +02:00
parent 78914e54b3
commit 011a865271

View File

@ -16,3 +16,12 @@ tap.test('should create a valid looptracker instance', async () => {
myLoopTracker = new lik.LoopTracker()
expect(myLoopTracker).to.be.instanceof(lik.LoopTracker)
})
tap.test('should add objects once and return true', async () => {
expect(myLoopTracker.checkAndTrack(object1)).to.be.true
expect(myLoopTracker.checkAndTrack(object1)).to.be.false
expect(myLoopTracker.checkAndTrack(object2)).to.be.true
expect(myLoopTracker.checkAndTrack(object2)).to.be.false
})
tap.start()