mirror of
https://github.com/niri-wm/niri.git
synced 2026-06-23 02:05:33 +07:00
Set miette report handler in tests too
This commit is contained in:
@@ -340,10 +340,14 @@ impl FromStr for Key {
|
||||
|
||||
#[cfg(test)]
|
||||
mod tests {
|
||||
use miette::NarratableReportHandler;
|
||||
|
||||
use super::*;
|
||||
|
||||
#[track_caller]
|
||||
fn check(text: &str, expected: Config) {
|
||||
let _ = miette::set_hook(Box::new(|_| Box::new(NarratableReportHandler::new())));
|
||||
|
||||
let parsed = Config::parse("test.kdl", text)
|
||||
.map_err(miette::Report::new)
|
||||
.unwrap();
|
||||
|
||||
Reference in New Issue
Block a user