Skip to content

Commit

Permalink
Merge pull request #568 from Enselic/insta
Browse files Browse the repository at this point in the history
tests: Use `insta` instead of `expect-test` for public API test
  • Loading branch information
Enselic authored Jan 15, 2025
2 parents f4bbad0 + c060ca2 commit 55c8be8
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 19 deletions.
54 changes: 37 additions & 17 deletions Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion Cargo.toml
Original file line number Diff line number Diff line change
Expand Up @@ -43,7 +43,7 @@ pretty_assertions = "0.6"
rustup-toolchain = "0.1.5"
rustdoc-json = "0.8.8"
public-api = "0.33.1"
expect-test = "1.4.1"
insta = "1.42.0"

[features]

Expand Down
2 changes: 1 addition & 1 deletion tests/public_api.rs
Original file line number Diff line number Diff line change
Expand Up @@ -24,5 +24,5 @@ fn public_api() {
.unwrap();

// Assert that the public API looks correct
expect_test::expect_file!["public-api.txt"].assert_eq(&public_api.to_string());
insta::assert_snapshot!(public_api);
}
Original file line number Diff line number Diff line change
@@ -1,3 +1,7 @@
---
source: tests/public_api.rs
expression: public_api
---
pub mod syntect
pub mod syntect::dumps
pub fn syntect::dumps::dump_binary<T: serde::ser::Serialize>(o: &T) -> alloc::vec::Vec<u8>
Expand Down

0 comments on commit 55c8be8

Please sign in to comment.