Use shared insta filters (#270)

Internal refactoring for consistency between tests
This commit is contained in:
konsti 2023-11-02 16:42:59 +01:00 committed by GitHub
parent 62c474d880
commit c6f2dfd727
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
7 changed files with 43 additions and 73 deletions

View file

@ -0,0 +1,8 @@
pub(crate) const BIN_NAME: &str = "puffin";
// Not all tests use them and cargo warns otherwise
#[allow(dead_code)]
pub(crate) const INSTA_FILTERS: &[(&str, &str)] = &[
(r"(\d+\.)?\d+(ms|s)", "[TIME]"),
(r"# .* pip-compile", "# [BIN_PATH] pip-compile"),
(r"--cache-dir .*", "--cache-dir [CACHE_DIR]"),
];