Skip to content

Commit

Permalink
test(command/build): right test case
Browse files Browse the repository at this point in the history
the test case would pass after solving rustwasm#408
  • Loading branch information
huangjj27 committed Oct 13, 2018
1 parent ba36d8a commit 1e5848f
Showing 1 changed file with 5 additions and 4 deletions.
9 changes: 5 additions & 4 deletions tests/all/build.rs
Original file line number Diff line number Diff line change
Expand Up @@ -25,19 +25,20 @@ fn build_in_non_crate_directory_doesnt_panic() {
#[test]
fn it_format_out_dir_on_windows() {
let fixture = utils::fixture::js_hello_world();
fixture.install_local_wasm_bindgen();
let cli = Cli::from_iter_safe(vec![
"wasm-pack",
"build",
&fixture.path.display().to_string(),
])
.unwrap();
let logger = logger::new(&cli.cmd, cli.verbosity).unwrap();
let result = command::run_wasm_pack(cli.cmd, &logger);
assert!(result.is_ok(), "js_hello_world example should pass");
let logger = logger::new(&cli.cmd, 1).unwrap();
let _result =
command::run_wasm_pack(cli.cmd, &logger).expect("js_hello_world example should pass");

let wasm_pack_log = utils::file::read_file(&fixture.path.join("wasm-pack.log")).unwrap();
assert!(
wasm_pack_log.contains(r"Your wasm pkg is ready to publish at \\?\C:\Users\"),
"directories in wasm-pack.log should be well formatted",
);
}
}

0 comments on commit 1e5848f

Please sign in to comment.