We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent f45322c commit e59c95aCopy full SHA for e59c95a
tests/all/build.rs
@@ -19,3 +19,20 @@ fn build_in_non_crate_directory_doesnt_panic() {
19
let err_msg = result.unwrap_err().to_string();
20
assert!(err_msg.contains("missing a `Cargo.toml`"));
21
}
22
+
23
+#[test]
24
+fn build_with_no_rust_is_err() {
25
+ let fixture = utils::fixture::not_a_crate();
26
+ let cli = Cli::from_iter_safe(vec![
27
+ "wasm-pack",
28
+ "build",
29
+ &fixture.path.display().to_string(),
30
+ ]).unwrap();
31
+ let logger = logger::new(&cli.cmd, cli.verbosity).unwrap();
32
+ let result = command::run_wasm_pack(cli.cmd, &logger);
33
+ assert!(
34
+ result.is_err(),
35
+ "running wasm-pack with no Rust should fail, but it should not panic"
36
+ );
37
+ let err_msg = result.unwrap_err().to_string();
38
+}
0 commit comments