diff --git a/milli/src/search/facet/filter.rs b/milli/src/search/facet/filter.rs index 88815d884..642a32472 100644 --- a/milli/src/search/facet/filter.rs +++ b/milli/src/search/facet/filter.rs @@ -644,4 +644,10 @@ mod tests { error.to_string() ); } + + #[test] + fn empty_filter() { + let option = Filter::from_str(" ").unwrap(); + assert_eq!(option, None); + } }