From 31854ec26fb72264fed4bdc75c82962b3f1d19c4 Mon Sep 17 00:00:00 2001 From: duqingquan Date: Wed, 13 Sep 2023 19:51:30 +0800 Subject: [PATCH] =?UTF-8?q?=E4=BF=AE=E5=BE=A9=E9=83=A8=E5=88=86=E6=8A=A5?= =?UTF-8?q?=E8=AD=A6?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- uni_modules/uts-tests/utssdk/Array.uts | 12 ++++++------ 1 file changed, 6 insertions(+), 6 deletions(-) diff --git a/uni_modules/uts-tests/utssdk/Array.uts b/uni_modules/uts-tests/utssdk/Array.uts index ac76977..7789c6f 100644 --- a/uni_modules/uts-tests/utssdk/Array.uts +++ b/uni_modules/uts-tests/utssdk/Array.uts @@ -41,7 +41,7 @@ export function testArray(): Result { }) test('length', () => { - const arr: string[] = ['shoes', 'shirts', 'socks', 'sweaters']; + const arr = ['shoes', 'shirts', 'socks', 'sweaters']; expect(arr.length).toEqual(4); expect(arr[0]).toEqual('shoes'); expect(arr[1]).toEqual('shirts'); @@ -65,17 +65,17 @@ export function testArray(): Result { expect(['a', 'b', 'c'].concat(['d', 'e', 'f'])).toEqual(["a", "b", "c", "d", "e", "f"]); expect([1, 2, 3].concat([4, 5, 6])).toEqual([1, 2, 3, 4, 5, 6]); expect([''].concat([''])).toEqual(["", ""]); - const num1: number[] = [1, 2, 3]; - const num2: number[] = [4, 5, 6]; - const num3: number[] = [7, 8, 9]; + const num1 = [1, 2, 3]; + const num2 = [4, 5, 6]; + const num3 = [7, 8, 9]; const numbers = num1.concat(num2, num3); expect(numbers).toEqual([1, 2, 3, 4, 5, 6, 7, 8, 9]); }) test("copyWithin", () => { - const arr: string[] = ['a', 'b', 'c', 'd', 'e']; + const arr = ['a', 'b', 'c', 'd', 'e']; expect(arr.copyWithin(0, 3, 4)).toEqual(["d", "b", "c", "d", "e"]); expect(arr.copyWithin(1, 3)).toEqual(["d", "d", "e", "d", "e"]); - const arr2: number[] = [1, 2, 3, 4, 5]; + const arr2 = [1, 2, 3, 4, 5]; expect(arr2.copyWithin(-2)).toEqual([1, 2, 3, 1, 2]); expect(arr2.copyWithin(-2, -3, -1)).toEqual([1, 2, 3, 3, 1]); }) -- GitLab