mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-04-01 18:01:06 +00:00
Fix a failing CLI test
This commit is contained in:
parent
22b26db911
commit
346868f78b
@ -1982,7 +1982,8 @@ impl<'a> Context<'a> {
|
|||||||
if !self.config.mode.nodejs() && !self.config.mode.bundler() {
|
if !self.config.mode.nodejs() && !self.config.mode.bundler() {
|
||||||
bail!(
|
bail!(
|
||||||
"NPM dependencies have been specified in `{}` but \
|
"NPM dependencies have been specified in `{}` but \
|
||||||
this is only compatible with the `bundler` and `nodejs` targets"
|
this is only compatible with the `bundler` and `nodejs` targets",
|
||||||
|
path.display(),
|
||||||
);
|
);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -22,10 +22,15 @@ fn no_modules_rejects_npm() {
|
|||||||
.file("package.json", "")
|
.file("package.json", "")
|
||||||
.wasm_bindgen("--no-modules");
|
.wasm_bindgen("--no-modules");
|
||||||
cmd.assert()
|
cmd.assert()
|
||||||
.stderr("\
|
.stderr(
|
||||||
error: failed to generate bindings for JS import `foo`
|
str::is_match(
|
||||||
caused by: import from `foo` module not allowed with `--target no-modules`; use `nodejs`, `web`, or `bundler` target instead
|
"\
|
||||||
")
|
error: NPM dependencies have been specified in `.*` but this is only \
|
||||||
|
compatible with the `bundler` and `nodejs` targets
|
||||||
|
",
|
||||||
|
)
|
||||||
|
.unwrap(),
|
||||||
|
)
|
||||||
.failure();
|
.failure();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
x
Reference in New Issue
Block a user