Add additional asserts for JS main manifest files

master
Ian McIntyre 7 years ago committed by Ashley Williams
parent 6061eb5595
commit 8eb01dd4a3
  1. 3
      tests/manifest/main.rs

@ -84,6 +84,8 @@ fn it_creates_a_package_json_provided_path() {
assert!(utils::read_package_json(&path).is_ok());
let pkg = utils::read_package_json(&path).unwrap();
assert_eq!(pkg.name, "js-hello-world");
assert_eq!(pkg.main, "js_hello_world.js");
let actual_files: HashSet<String> = pkg.files.into_iter().collect();
let expected_files: HashSet<String> = [
@ -107,6 +109,7 @@ fn it_creates_a_package_json_provided_path_with_scope() {
assert!(utils::read_package_json(&path).is_ok());
let pkg = utils::read_package_json(&path).unwrap();
assert_eq!(pkg.name, "@test/scopes-hello-world");
assert_eq!(pkg.main, "scopes_hello_world.js");
let actual_files: HashSet<String> = pkg.files.into_iter().collect();
let expected_files: HashSet<String> = [

Loading…
Cancel
Save