From acc1fa2b4e41b3099826eb1371b11634828b75f9 Mon Sep 17 00:00:00 2001 From: ImperialSympathizer Date: Thu, 12 Sep 2024 23:12:48 -0400 Subject: [PATCH] re-enable stubbed function for Phaser text styling --- src/test/utils/mocks/mocksContainer/mockText.ts | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/test/utils/mocks/mocksContainer/mockText.ts b/src/test/utils/mocks/mocksContainer/mockText.ts index 5eb5eae5494..8ae9bda80f6 100644 --- a/src/test/utils/mocks/mocksContainer/mockText.ts +++ b/src/test/utils/mocks/mocksContainer/mockText.ts @@ -17,7 +17,9 @@ export default class MockText implements MockGameObject { this.scene = textureManager.scene; this.textureManager = textureManager; this.style = {}; - // Phaser.GameObjects.TextStyle.prototype.setStyle = () => null; + // DO NOT REMOVE: function needs to be stubbed for tests + // @ts-ignore + Phaser.GameObjects.TextStyle.prototype.setStyle = () => this; // Phaser.GameObjects.Text.prototype.updateText = () => null; // Phaser.Textures.TextureManager.prototype.addCanvas = () => {}; UI.prototype.showText = this.showText;