added canceled field, and test

This commit is contained in:
İlker Yıldırım 2020-06-09 23:03:07 +03:00
parent 008e8a4aca
commit 4cbbd722ed
1 changed files with 7 additions and 0 deletions

View File

@ -72,3 +72,10 @@ test('accepts `customTimers` option', async t => {
}
});
});
test('clears timeout when clear triggered', t => {
const pT = pTimeout(delay(200), 50);
pT.clear();
t.is(pT.canceled, true);
});