mirror of
https://github.com/NativeScript/NativeScript.git
synced 2025-11-05 13:26:48 +08:00
Fix timer snippets (#4437)
This commit is contained in:
committed by
Alexander Vakrilov
parent
60f17536a0
commit
30d4e93e3a
@@ -132,13 +132,9 @@ export function test_setInterval_callbackCalledWithExtraArgs() {
|
||||
let expected: number = 4;
|
||||
let rnd: number = Math.random();
|
||||
|
||||
// >> timer-set-expression
|
||||
const id = timer.setInterval((arg) => {
|
||||
// >> (hide)
|
||||
counter += arg === rnd ? 1 : -1;
|
||||
// << (hide)
|
||||
}, 50, rnd);
|
||||
// << timer-set-expression
|
||||
|
||||
TKUnit.waitUntilReady(() => counter >= expected, 0.25, false);
|
||||
timer.clearInterval(id);
|
||||
|
||||
Reference in New Issue
Block a user