feat: test script
This commit is contained in:
@@ -47,13 +47,16 @@ fn main() -> Result<()> {
|
||||
|store, module, linker| Exports::instantiate(store, module, linker, |cx| &mut cx.exports),
|
||||
)?;
|
||||
let a = exports.eval_javascript(&mut store, r##"
|
||||
function hi(name) { return "hi: " + name; }
|
||||
let a = [];
|
||||
a.push(fetch('https://www.google.com/'));
|
||||
for (let i = 0; i < 3; i++) { a.push(i); }
|
||||
a.push({
|
||||
id: 1, name: 'hatter'
|
||||
});
|
||||
//JSON.stringify(a)
|
||||
a.push(hi('001'));
|
||||
a.push(hi('002'));
|
||||
// JSON.stringify(a)
|
||||
a
|
||||
"##);
|
||||
|
||||
|
||||
Reference in New Issue
Block a user