提交 960622e7 编写于 作者: 杜庆泉's avatar 杜庆泉

增加 setInterval 测试示例

上级 6ae6c336
......@@ -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);
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册