mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Merge branch 'master' into return-missing-css-errors
This commit is contained in:
@@ -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;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user