From a4cfa923b7df3605af24c519c7ceb12766ac1c01 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Hanno=20J=2E=20G=C3=B6decke?= Date: Fri, 10 May 2024 12:23:09 +0200 Subject: [PATCH] repro: Add failing recursive object test --- example/Tests/sharedvalue-tests.ts | 7 +++++++ 1 file changed, 7 insertions(+) diff --git a/example/Tests/sharedvalue-tests.ts b/example/Tests/sharedvalue-tests.ts index c1cb2ba..97972d9 100644 --- a/example/Tests/sharedvalue-tests.ts +++ b/example/Tests/sharedvalue-tests.ts @@ -39,6 +39,13 @@ export const sharedvalue_tests = { ); }, + get_set_recursive_value: () => { + const x = { a: 5, b: {} }; + x.b = x; + const sharedValue = Worklets.createSharedValue(x); + return ExpectValue(sharedValue.value, x); + }, + is_object: () => { const sharedValue = Worklets.createSharedValue({ a: 100, b: 200 }); return ExpectValue(typeof sharedValue.value === "object", true);