File size: 317 Bytes
c670567
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
import { vi } from 'vitest';
import { Image } from 'canvas';

// Provide Image for Phaser to use in headless mode
globalThis.Image = Image as any;

// JSDOM occasionally needs these no-ops
globalThis.scrollTo ||= () => {};

// Use fake timers to step Phaser's main loop deterministically in tests
vi.useFakeTimers();