now testing properly

This commit is contained in:
2017-03-26 22:01:33 +02:00
parent c54644949e
commit 638c1a8c8c
8 changed files with 1636 additions and 66 deletions

View File

@@ -1,16 +1,11 @@
import 'typings-test'
import { expect, tap } from 'tapbundle'
import * as smartdelay from 'smartdelay'
import early = require('../dist/index')
describe('early', function () {
it('.start()', function (done) {
this.timeout(10000)
early.start('early')
setTimeout(done, 5000)
})
it('.stop()', function (done) {
early.stop()
.then(() => {
done()
})
})
tap.test('.start()', async () => {
early.start('early')
await smartdelay.delayFor(2000)
})
tap.test('.stop()', async () => {
await early.stop()
})