mirror of
https://github.com/fluencelabs/wasm-bindgen
synced 2025-03-16 02:00:51 +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() {
|
||||
bail!(
|
||||
"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", "")
|
||||
.wasm_bindgen("--no-modules");
|
||||
cmd.assert()
|
||||
.stderr("\
|
||||
error: failed to generate bindings for JS import `foo`
|
||||
caused by: import from `foo` module not allowed with `--target no-modules`; use `nodejs`, `web`, or `bundler` target instead
|
||||
")
|
||||
.stderr(
|
||||
str::is_match(
|
||||
"\
|
||||
error: NPM dependencies have been specified in `.*` but this is only \
|
||||
compatible with the `bundler` and `nodejs` targets
|
||||
",
|
||||
)
|
||||
.unwrap(),
|
||||
)
|
||||
.failure();
|
||||
}
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user