MCPcopy
hub / github.com/4ian/GDevelop / checkCurrentSceneIs

Function checkCurrentSceneIs

Extensions/Multiplayer/tests/multiplayer.spec.js:2385–2391  ·  view source on GitHub ↗
(runtimeGame, expectedSceneName)

Source from the content-addressed store, hash-verified

2383 * @returns {{currentScene: gdjs.RuntimeScene}}
2384 */
2385 const checkCurrentSceneIs = (runtimeGame, expectedSceneName) => {
2386 const currentScene = runtimeGame.getSceneStack().getCurrentScene();
2387 if (!currentScene) throw new Error('No current scene found.');
2388 expect(currentScene.getName()).to.be(expectedSceneName);
2389
2390 return { currentScene };
2391 };
2392
2393 it('synchronizes scenes from the host to other players', async () => {
2394 const { switchToPeer, initiateGameWithPlayers } =

Callers 1

Calls 3

getSceneStackMethod · 0.80
getNameMethod · 0.65
getCurrentSceneMethod · 0.45

Tested by

no test coverage detected