Merge branch 'master' into return-missing-css-errors

This commit is contained in:
Svetoslav
2019-08-02 19:16:37 +03:00
committed by GitHub
3 changed files with 26 additions and 0 deletions

View File

@@ -72,6 +72,23 @@ export function test_setTimeout_callbackCalledAfterSpecifiedTime() {
TKUnit.assert(completed, "Callback should be called after the specified time!");
}
export function test_setTimeout_callbackCalledWithBooleanPeriod() {
let completed = false;
// >> timer-set-false
const id = timer.setTimeout(() => {
// >> (hide)
completed = true;
// << (hide)
// @ts-ignore
}, false);
// << timer-set-false
TKUnit.waitUntilReady(() => completed, 1);
timer.clearTimeout(id);
TKUnit.assert(completed, "Callback should be called in 0 seconds!");
}
export function test_setTimeout_callbackNotCalled() {
let completed = false;