We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 64b2fef commit 787ffc9Copy full SHA for 787ffc9
crates/cli/tests/wasm-bindgen/main.rs
@@ -258,14 +258,17 @@ fn default_module_path_target_no_modules() {
258
cmd.assert().success();
259
let contents =
260
fs::read_to_string(out_dir.join("default_module_path_target_no_modules.js")).unwrap();
261
+ assert!(contents.contains(
262
+ "\
263
+ if (typeof document === 'undefined') {
264
+ script_src = location.href;
265
+ } else {
266
+ script_src = document.currentScript.src;
267
+ }",
268
+ ));
269
assert!(contents.contains(
270
"\
271
async function init(input) {
- if (typeof document === 'undefined') {
- script_src = location.href;
- } else {
- script_src = document.currentScript.src;
- }
272
if (typeof input === 'undefined') {
273
input = script_src.replace(/\\.js$/, '_bg.wasm');
274
}",
0 commit comments