diff --git a/crates/bevy_ecs/src/system/mod.rs b/crates/bevy_ecs/src/system/mod.rs index 5fd37e11534b4..3f338cbda66aa 100644 --- a/crates/bevy_ecs/src/system/mod.rs +++ b/crates/bevy_ecs/src/system/mod.rs @@ -1212,4 +1212,11 @@ mod tests { let query = unsafe { Query::new(&world2, &qstate, 0, 0, false) }; query.iter(); } + + #[test] + #[should_panic] + fn panic_inside_system() { + let mut world = World::new(); + run_system(&mut world, || panic!("this system panics")); + } }