From d524c2309d1a09f8da8163b119530b16d221833d Mon Sep 17 00:00:00 2001 From: Fabian Flugund Date: Wed, 27 Feb 2019 09:21:16 +0100 Subject: [PATCH] Cleaner test --- test/test-basic.ts | 12 ++++-------- 1 file changed, 4 insertions(+), 8 deletions(-) diff --git a/test/test-basic.ts b/test/test-basic.ts index 4b5e9f6..4e0617c 100644 --- a/test/test-basic.ts +++ b/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 @@ -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') })