Skip to content

Commit

Permalink
Cleaner test
Browse files Browse the repository at this point in the history
  • Loading branch information
fabianflugund committed Feb 27, 2019
1 parent d4879d3 commit d524c23
Showing 1 changed file with 4 additions and 8 deletions.
12 changes: 4 additions & 8 deletions test/test-basic.ts
@@ -1,6 +1,6 @@
import 'source-map-support/register'
import * as test from 'purple-tape'
import { setRandomizedInterval, setRandomizedIntervalAsync } from '../index'
import { setRandomizedInterval } from '../index'

test('shall fire a reasonable number of times', function*(t) {
let times = 0
Expand Down Expand Up @@ -64,15 +64,11 @@ test('unref()', function*(t) {
t.pass('if the test exits, the unref() was successful')
})

test('setRandomizedIntervalAsync clear()', function*(t) {
let t1 = setRandomizedIntervalAsync(async () => {
await wait(1000)
test('setRandomizedInterval clear()', function(t) {
let t1 = setRandomizedInterval(() => {
t1.clear()
}, 100)

yield wait(100)

t1.clear()

t.pass('if the test exits, the clear() was successful')
})

Expand Down

0 comments on commit d524c23

Please sign in to comment.