diff --git a/uni_modules/uts-tests/utssdk/UTSJSONObject.uts b/uni_modules/uts-tests/utssdk/UTSJSONObject.uts index 03b2a71ef5db377a389491f9bac34a726101e60e..34d875b10103de1fedcec66065936bc4f18890bf 100644 --- a/uni_modules/uts-tests/utssdk/UTSJSONObject.uts +++ b/uni_modules/uts-tests/utssdk/UTSJSONObject.uts @@ -337,5 +337,14 @@ export function testUTSJSONObject() : Result { expect(obj.getString("a.b.c")).toEqual('c1') }) + + test('property-access', () => { + const obj = { + a: { b: { c: 'c' } } + } + expect(((obj.a as UTSJSONObject).b as UTSJSONObject).c).toEqual('c'); + ((obj.a as UTSJSONObject).b as UTSJSONObject).c = 'c1'; + expect(((obj.a as UTSJSONObject).b as UTSJSONObject).c).toEqual('c1'); + }) }) } \ No newline at end of file