chore: Stop cding into binary_install and use --all instead

test: Put tests that access private functions in tests module
master
Jesper Håkansson 7 years ago
parent 3fc5df8b7a
commit 74739e5a10
  1. 6
      .travis.yml
  2. 5
      binary-install/src/lib.rs

@ -47,14 +47,10 @@ matrix:
install: install:
- *INSTALL_NODE_VIA_NVM - *INSTALL_NODE_VIA_NVM
script: script:
- cargo test --locked - cargo test --all --locked
- rustup component add rustfmt-preview - rustup component add rustfmt-preview
- cargo fmt --version - cargo fmt --version
- cargo fmt --all -- --check - cargo fmt --all -- --check
- cd binary-install
- cargo test
- cargo fmt --all -- --check
- cd ..
- name: Book - name: Book
rust: stable rust: stable

@ -278,6 +278,10 @@ fn hashed_dirname(url: &str, name: &str) -> String {
format!("{}-{}", name, hex) format!("{}-{}", name, hex)
} }
#[cfg(test)]
mod tests {
use super::*;
#[test] #[test]
fn it_returns_same_hash_for_same_name_and_url() { fn it_returns_same_hash_for_same_name_and_url() {
let name = "wasm-pack"; let name = "wasm-pack";
@ -339,3 +343,4 @@ fn it_returns_destination_if_binary_already_exists() {
assert!(dl.is_ok()); assert!(dl.is_ok());
assert!(dl.unwrap().is_some()) assert!(dl.unwrap().is_some())
} }
}

Loading…
Cancel
Save