diff --git a/uni_modules/uts-tests/utssdk/Global.uts b/uni_modules/uts-tests/utssdk/Global.uts index b36b15dac82f5d14c34366c7c4d23eb4e6ef77ba..8cc0cbd85fc5a9d1bfebf7e76e4db6e751b5b2c4 100644 --- a/uni_modules/uts-tests/utssdk/Global.uts +++ b/uni_modules/uts-tests/utssdk/Global.uts @@ -3,6 +3,22 @@ import { describe, test, expect, Result } from './tests.uts' export function testGlobal(): Result { return describe("Global", () => { + + test('setInterval', () => { + + // #ifdef APP-ANDROID + let aCount = 0 + let taskId = setInterval(function(){ + aCount += 1 + },0) + setTimeout(function(){ + console.log(aCount) + console.log(taskId) + clearInterval(taskId) + expect(aCount > 10).toEqual(true); + },200) + // #endif + }) test('parseInt', () => { expect(parseInt("123.456")).toEqual(123); expect(parseInt("123")).toEqual(123);