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

增加部分 UTSArray include 数字序列化后的测试用例

上级 4d91ff31
import { describe, test, expect, Result } from './tests.uts'
export function testArray(): Result {
return describe("Array", () => {
......@@ -177,6 +179,15 @@ export function testArray(): Result {
const array2: string[] = ['a', 'b', 'c'];
expect(array2.includes('c', 3)).toEqual(false);
expect(array2.includes('c', 100)).toEqual(false);
type P = {
x : number
y : number
}
const s = JSON.parse<P[]>(JSON.stringify([{ x: 0, y: 0 }])) as P[]
s[0].x += 0;
const clearList = s.map((v : P, _, _a) : number => v.x)
expect(clearList.includes(0)).toEqual(true);
})
test("indexOf", () => {
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册