I'm not 100% sure this is related to this library but it's perhaps worth giving it a shot. I'm trying to run my Phaser game with Vitest/Vite and have used this library as part of the vitest.setup.ts to stage everything so that the game can spin up in headless mode. This works since Vitest performs it's tests in NodeJS using JSDOM.
The issue I'm experiencing is lots of weird issues when my test watcher retriggers execution. It throws all type of weird Pango/Cairo related issues and ultimately kills the active terminal on Ubuntu. Over at windows, it just crashes the execution and leaves you in blank terminal.
Here's a little repro with the short steps involved to reproduce the bug.
Perhaps someone here has an idea what could be causing this. I've been searching/trying out things for a couple of hours, including destroying the game, delaying execution etc. but nothing helped so far.
I'm not 100% sure this is related to this library but it's perhaps worth giving it a shot. I'm trying to run my Phaser game with Vitest/Vite and have used this library as part of the vitest.setup.ts to stage everything so that the game can spin up in headless mode. This works since Vitest performs it's tests in NodeJS using JSDOM.
The issue I'm experiencing is lots of weird issues when my test watcher retriggers execution. It throws all type of weird Pango/Cairo related issues and ultimately kills the active terminal on Ubuntu. Over at windows, it just crashes the execution and leaves you in blank terminal.
Here's a little repro with the short steps involved to reproduce the bug.
https://github.com/zewa666/phaser-vitest-bug
Perhaps someone here has an idea what could be causing this. I've been searching/trying out things for a couple of hours, including destroying the game, delaying execution etc. but nothing helped so far.