Skip to content

Commit

Permalink
chore: add json parse test (#204)
Browse files Browse the repository at this point in the history
  • Loading branch information
hannojg authored Jun 3, 2024
1 parent 6a9807e commit f046ee8
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions package/example/Tests/worklet-tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -213,4 +213,12 @@ export const worklet_tests = {
worklet(func);
});
},
check_worklet_json_parse: () => {
const dataStr = '{"test-1":"123"}';
const value = Worklets.defaultContext.runAsync(() => {
"worklet";
return JSON.parse(dataStr);
});
return ExpectValue(value, { "test-1": "123" });
},
};

0 comments on commit f046ee8

Please sign in to comment.