()
| 20 | * Due to js-dom limitations, layouts are not correctly computed. |
| 21 | */ |
| 22 | export function mockScene2D() { |
| 23 | const playback = new PlaybackManager(); |
| 24 | const status = new PlaybackStatus(playback); |
| 25 | const description = { |
| 26 | ...makeScene2D('scene 1', function* () { |
| 27 | // do nothing |
| 28 | }), |
| 29 | name: 'test', |
| 30 | size: new Vector2(1920, 1080), |
| 31 | resolutionScale: 1, |
| 32 | playback: status, |
| 33 | } as unknown as FullSceneDescription<ThreadGeneratorFactory<View2D>>; |
| 34 | const scene = new Scene2D(description); |
| 35 | |
| 36 | beforeAll(() => { |
| 37 | startScene(scene); |
| 38 | startPlayback(status); |
| 39 | }); |
| 40 | afterAll(() => { |
| 41 | endPlayback(status); |
| 42 | endScene(scene); |
| 43 | }); |
| 44 | beforeEach(() => scene.reset()); |
| 45 | } |
no test coverage detected