MCPcopy Create free account
hub / github.com/awslabs/llrt / json_stringify_objects

Function json_stringify_objects

libs/llrt_json/src/lib.rs:138–147  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

136
137 #[tokio::test]
138 async fn json_stringify_objects() {
139 test_sync_with(|ctx| {
140 let date: Value = ctx.eval("let obj = { date: new Date(0) };obj;")?;
141 let stringified = json_stringify(&ctx, date.clone())?.unwrap();
142 let stringified_2 = ctx.json_stringify(date)?.unwrap().to_string()?;
143 assert_eq!(stringified, stringified_2);
144 Ok(())
145 })
146 .await;
147 }
148
149 #[tokio::test]
150 async fn huge_numbers() {

Callers

nothing calls this directly

Calls 4

test_sync_withFunction · 0.85
json_stringifyFunction · 0.85
cloneMethod · 0.45
to_stringMethod · 0.45

Tested by

no test coverage detected