提交 5a0bc95d 编写于 作者: F fxy060608

feat: 增加 UTSJSONObject 点操作符访问测试例

上级 4d3d6a40
......@@ -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
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册