mirror of
https://github.com/meilisearch/MeiliSearch
synced 2025-07-04 20:37:15 +02:00
test the register tasks
This commit is contained in:
parent
fc098022c7
commit
7d0c8a3379
5 changed files with 102 additions and 3 deletions
|
@ -15,3 +15,22 @@ pub use error::Error;
|
|||
pub use task::KindWithContent as TaskKind;
|
||||
/// from the exterior you don't need to know there is multiple type of `Task`
|
||||
pub use task::TaskView as Task;
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
#[macro_export]
|
||||
macro_rules! assert_smol_debug_snapshot {
|
||||
($value:expr, @$snapshot:literal) => {{
|
||||
let value = format!("{:?}", $value);
|
||||
insta::assert_snapshot!(value, stringify!($value), @$snapshot);
|
||||
}};
|
||||
($name:expr, $value:expr) => {{
|
||||
let value = format!("{:?}", $value);
|
||||
insta::assert_snapshot!(Some($name), value, stringify!($value));
|
||||
}};
|
||||
($value:expr) => {{
|
||||
let value = format!("{:?}", $value);
|
||||
insta::assert_snapshot!($crate::_macro_support::AutoName, value, stringify!($value));
|
||||
}};
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue