When this test fails, print out why to assist in debugging

This commit is contained in:
Carol (Nichols || Goulding) 2019-08-06 22:11:36 -04:00
parent 0c37b912ba
commit f9f9785839
No known key found for this signature in database
GPG Key ID: D04B39A6CA243902
1 changed files with 6 additions and 1 deletions

View File

@ -9,7 +9,12 @@ fn mdbook_can_correctly_test_a_passing_book() {
let temp = DummyBook::new().with_passing_test(true).build().unwrap();
let mut md = MDBook::load(temp.path()).unwrap();
assert!(md.test(vec![]).is_ok());
let result = md.test(vec![]);
assert!(
result.is_ok(),
"Tests failed with {}",
result.err().unwrap()
);
}
#[test]