Disable Bevy renderer for tests

Building a bevy crate to ease 2D sprites animations, we wanted to use some parts of the SpritePlugin crate (precisely the TextureAtlas) which deeply rely on the RenderPlugin.

Opening a window and testing rendering is not possible in tests/CI environments, which seems logic. So we needed to disable all these features to make our test pass.

Here is a basic code to run your Bevy app with no renderer and no window:

fn sprite_time_is_updated() {
    // Setup app
    let mut app = App::new();

        .set(RenderPlugin {
            render_creation: WgpuSettings {
                backends: None,

    // Now you can run your tests


Be the first to post a comment!

Add a comment