diff --git a/uni_modules/uts-tests/utssdk/Array.uts b/uni_modules/uts-tests/utssdk/Array.uts index ac76977e63ff1927571dd19e5a602307522ad81d..7789c6f7116bb918536f26ea7e258e0851fb2979 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]); })