diff --git a/uni_modules/uts-tests/utssdk/UTSJSONObject.uts b/uni_modules/uts-tests/utssdk/UTSJSONObject.uts index c0d12c5b99d6610b0ab2f5535a47f86615b1f3ef..cb4820e2cd6f08b8a63b7ee323121a9e8d85334c 100644 --- a/uni_modules/uts-tests/utssdk/UTSJSONObject.uts +++ b/uni_modules/uts-tests/utssdk/UTSJSONObject.uts @@ -26,6 +26,23 @@ export function testUTSJSONObject() : Result { // #endif }) + test('setvalue-after-get', () => { + let obj = { + "cars":[ + { + name:"car1", + value:100 + } + ] + } + + let cars = obj.getArray("cars") + cars![0].set("value",20) + let firstCar = obj.getJSON("cars[0]") + expect(firstCar!['value']).toEqual(20); + + }) + test('assign-withtype', () => { // #ifdef APP-ANDROID type User = {