fix: ignore non dependency keys in package json (#1969)

resolves #1921
This commit is contained in:
Mario Reder
2020-01-21 20:04:40 +01:00
committed by Alex Crichton
parent 0f0d5ee0fb
commit 34eb8a8516
2 changed files with 14 additions and 22 deletions

View File

@@ -35,8 +35,8 @@ compatible with the `bundler` and `nodejs` targets
}
#[test]
fn more_package_json_fields_rejected() {
let (mut cmd, _out_dir) = Project::new("more_package_json_fields_rejected")
fn more_package_json_fields_ignored() {
let (mut cmd, _out_dir) = Project::new("more_package_json_fields_ignored")
.file(
"src/lib.rs",
r#"
@@ -63,16 +63,7 @@ fn more_package_json_fields_rejected() {
"#,
)
.wasm_bindgen("");
cmd.assert()
.stderr(
str::is_match(
"\
error: NPM manifest found at `.*` can currently only have one key, .*
",
)
.unwrap(),
)
.failure();
cmd.assert().success();
}
#[test]