diff --git a/client/src/controllers/TeleportController.test.js b/client/src/controllers/TeleportController.test.js index 407277912b..0c0700da74 100644 --- a/client/src/controllers/TeleportController.test.js +++ b/client/src/controllers/TeleportController.test.js @@ -116,6 +116,55 @@ describe('TeleportController', () => { ); }); + it('should clear the target container if the reset value is set to true', async () => { + document.body.innerHTML += ` +
I should not be here
I should not be here
', + ); + + application.start(); + + await Promise.resolve(); + + expect(document.getElementById('target-container').innerHTML).toEqual( + 'I should still be here
I should still be here
', + ); + + application.start(); + + await Promise.resolve(); + + expect(document.getElementById('target-container').innerHTML).toEqual( + 'I should still be here