diff --git a/uni_modules/uts-tests/utssdk/JSON.uts b/uni_modules/uts-tests/utssdk/JSON.uts index 274fd4e90617c662df143f86a50195429d7f4134..1eb3d06afca4b84a1c3072780acc3f5071b13d4c 100644 --- a/uni_modules/uts-tests/utssdk/JSON.uts +++ b/uni_modules/uts-tests/utssdk/JSON.uts @@ -89,13 +89,13 @@ export function testJSON() : Result { "id": "30" }`; let obj2 = JSON.parseObject(json1); - expect(obj2!!.id).toEqual("30"); + expect(obj2!.id).toEqual("30"); const json2 = `{ "id": "30" }`; let obj3 = JSON.parseObject(json2); - expect(obj3!!.id).toEqual("30"); + expect(obj3!.id).toEqual("30"); const json3 = `{ "name": "John" }`; @@ -113,11 +113,11 @@ export function testJSON() : Result { const json3 = `[{"name":"John","id":"30"},{"name":"jack","id":"21"}]`; - const array3 = JSON.parseArray(json3); - expect((array3![0] as UTSJSONObject)["name"]).toEqual("John"); + const array3 = JSON.parseArray(json3); + // expect((array3![0])["name"]).toEqual("John"); }) - test('stringify', () => { + test('stringify', () => { const obj = { name: 'John', age: 30 }; const json = JSON.stringify(obj); // expect(json).toEqual('{"name":"John","age":30}'); diff --git a/uni_modules/uts-tests/utssdk/index.uts b/uni_modules/uts-tests/utssdk/index.uts index 9f07ef2f6baf1b145f4adbd300fa1daf5585a629..7376eaf98d56668965c5e31acba69d990141b6ac 100644 --- a/uni_modules/uts-tests/utssdk/index.uts +++ b/uni_modules/uts-tests/utssdk/index.uts @@ -3,7 +3,6 @@ import { testDate } from './Date.uts' import { testString } from './String.uts' import { testError } from './Error.uts' import { testKeyWord } from './KeyWord.uts' -import { testExtapi } from './Extapi.uts' import { testJSON } from './JSON.uts' import { testNumber } from './Number.uts' import { testMap } from './Map.uts'