diff --git a/uni_modules/uts-tests/utssdk/JSON.uts b/uni_modules/uts-tests/utssdk/JSON.uts index 7265e6d2ff86bb79eedc37d639dd3a52f2263ae0..c0c002bd3558c2145f1d97c99006f3668b1e2c89 100644 --- a/uni_modules/uts-tests/utssdk/JSON.uts +++ b/uni_modules/uts-tests/utssdk/JSON.uts @@ -11,7 +11,7 @@ export function testJSON() : Result { return describe("JSON", () => { test('parse', () => { const json = `{"result":true, "count":42}`; - const obj = JSON.parse(json)!; + const obj = JSON.parse(json) as UTSJSONObject; expect(obj["count"]).toEqual(42); expect(obj["result"] as boolean).toEqual(true); @@ -29,7 +29,7 @@ export function testJSON() : Result { const json2 = '{"string":"Hello","number":42,"boolean":true,"nullValue":null,"array":[1,2,3],"object":{"nestedKey":"nestedValue"}}'; - const obj2 = JSON.parse(json2)!; + const obj2 = JSON.parse(json2)!; expect(obj2).toEqual({ string: 'Hello', number: 42,