Merge pull request #57 from steveklabnik/gh56

Move examples into tests/fixtures
master
ashley williams 7 years ago committed by GitHub
commit 2567b20cc8
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
  1. 0
      tests/fixtures/js-hello-world/Cargo.lock
  2. 0
      tests/fixtures/js-hello-world/Cargo.toml
  3. 0
      tests/fixtures/js-hello-world/README.md
  4. 0
      tests/fixtures/js-hello-world/src/lib.rs
  5. 0
      tests/fixtures/no-readme/Cargo.lock
  6. 0
      tests/fixtures/no-readme/Cargo.toml
  7. 0
      tests/fixtures/no-readme/src/lib.rs
  8. 6
      tests/manifest.rs
  9. 2
      tests/readme.rs

@ -18,9 +18,9 @@ fn it_gets_the_crate_name_default_path() {
#[test]
fn it_gets_the_crate_name_provided_path() {
assert!(manifest::get_crate_name("./examples/js-hello-world").is_ok());
assert!(manifest::get_crate_name("tests/fixtures/js-hello-world").is_ok());
assert_eq!(
manifest::get_crate_name("./examples/js-hello-world").unwrap(),
manifest::get_crate_name("tests/fixtures/js-hello-world").unwrap(),
"js-hello-world"
);
}
@ -45,7 +45,7 @@ fn it_creates_a_package_json_default_path() {
#[test]
fn it_creates_a_package_json_provided_path() {
let path = "./examples/js-hello-world".to_string();
let path = "tests/fixtures/js-hello-world".to_string();
wasm_pack::create_pkg_dir(&path).unwrap();
assert!(manifest::write_package_json(&path).is_ok());
let package_json_path = format!("{}/pkg/package.json", &path);

@ -21,7 +21,7 @@ fn it_copies_a_readme_default_path() {
#[test]
fn it_creates_a_package_json_provided_path() {
let path = "./examples/js-hello-world".to_string();
let path = "tests/fixtures/js-hello-world".to_string();
assert!(readme::copy_from_crate(&path).is_ok());
let crate_readme_path = format!("{}/README.md", &path);
let pkg_readme_path = format!("{}/pkg/README.md", &path);

Loading…
Cancel
Save