Skip to content

Commit

Permalink
bad.js -> bad.mjs
Browse files Browse the repository at this point in the history
  • Loading branch information
pufferfish101007 committed Aug 26, 2023
1 parent 72473c3 commit 313bcec
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
/target/
/Cargo.lock
/bad.wasm
/bad.js
/bad.wat
/wabt*
/js/
Expand Down
2 changes: 1 addition & 1 deletion src/targets/wasm.rs
Original file line number Diff line number Diff line change
Expand Up @@ -1357,7 +1357,7 @@ mod tests {
let ir: IrProject = proj.into();
let wasm: WebWasmFile = ir.into();
fs::write("./bad.wasm", wasm.wasm_bytes()).expect("failed to write to bad.wasm");
fs::write("./bad.js", wasm.js_string()).expect("failed to write to bad.js");
fs::write("./bad.mjs", format!("export default {};", wasm.js_string())).expect("failed to write to bad.js");
let output = Command::new("node")
.arg("-e")
.arg(format!("({})().catch(console.error)", wasm.js_string()))
Expand Down

0 comments on commit 313bcec

Please sign in to comment.