master
lucashorward 5 years ago
parent 5039905fe4
commit af9b8aca8f
  1. 21
      tests/all/manifest.rs

@ -260,10 +260,11 @@ fn it_creates_a_package_json_with_correct_files_when_out_name_is_provided() {
assert_eq!(pkg.side_effects, false); assert_eq!(pkg.side_effects, false);
let actual_files: HashSet<String> = pkg.files.into_iter().collect(); let actual_files: HashSet<String> = pkg.files.into_iter().collect();
let expected_files: HashSet<String> = ["index_bg.wasm", "index_bg.js", "index.d.ts", "index.js"] let expected_files: HashSet<String> =
.iter() ["index_bg.wasm", "index_bg.js", "index.d.ts", "index.js"]
.map(|&s| String::from(s)) .iter()
.collect(); .map(|&s| String::from(s))
.collect();
assert_eq!(actual_files, expected_files); assert_eq!(actual_files, expected_files);
} }
@ -304,10 +305,14 @@ fn it_creates_a_package_json_with_correct_keys_when_types_are_skipped() {
assert_eq!(pkg.module, "js_hello_world.js"); assert_eq!(pkg.module, "js_hello_world.js");
let actual_files: HashSet<String> = pkg.files.into_iter().collect(); let actual_files: HashSet<String> = pkg.files.into_iter().collect();
let expected_files: HashSet<String> = ["js_hello_world_bg.wasm", "js_hello_world_bg.js", "js_hello_world.js"] let expected_files: HashSet<String> = [
.iter() "js_hello_world_bg.wasm",
.map(|&s| String::from(s)) "js_hello_world_bg.js",
.collect(); "js_hello_world.js",
]
.iter()
.map(|&s| String::from(s))
.collect();
assert_eq!(actual_files, expected_files); assert_eq!(actual_files, expected_files);
} }

Loading…
Cancel
Save