From ebe8f4652b8c63d1b50f956142189eb7b6d1e846 Mon Sep 17 00:00:00 2001 From: Ben <43026681+bwp91@users.noreply.github.com> Date: Sun, 1 Oct 2023 03:07:03 +0100 Subject: [PATCH] unneeded tests --- test/e2e/plugins.gateway.e2e-spec.ts | 64 ---------------------------- 1 file changed, 64 deletions(-) diff --git a/test/e2e/plugins.gateway.e2e-spec.ts b/test/e2e/plugins.gateway.e2e-spec.ts index f2ce8d52b..5a6ead494 100644 --- a/test/e2e/plugins.gateway.e2e-spec.ts +++ b/test/e2e/plugins.gateway.e2e-spec.ts @@ -353,70 +353,6 @@ describe('PluginsGateway (e2e)', () => { expect(client.emit).toHaveBeenCalledWith('stdout', expect.stringContaining('Operation succeeded!')); }); - it('ON /plugins/homebridge-update (1.2.x -> 1.3.x)', async () => { - // mock get homebridge package - pluginsService.getHomebridgePackage = async () => { - return { - name: 'homebridge', - private: false, - publicPackage: true, - installPath: pluginsPath, - latestVersion: '1.3.0', - installedVersion: '1.2.5' - }; - }; - - jest.spyOn(nodePtyService, 'spawn') - .mockImplementation(() => { - const term = new EventEmitter(); - setTimeout(() => { - term.emit('exit', 0); - }, 10); - return term; - }); - - const writeJsonMock = jest.spyOn(fs, 'writeJsonSync'); - - try { - await pluginsGateway.homebridgeUpdate(client, { version: 'latest' }); - } catch (e) { } - - // the save config method should have been called - expect(writeJsonMock).toHaveBeenCalled(); - }); - - it('ON /plugins/homebridge-update (1.1.x -> 1.3.x)', async () => { - // mock get homebridge package - pluginsService.getHomebridgePackage = async () => { - return { - name: 'homebridge', - private: false, - publicPackage: true, - installPath: pluginsPath, - latestVersion: '1.3.0', - installedVersion: '1.1.7' - }; - }; - - jest.spyOn(nodePtyService, 'spawn') - .mockImplementation(() => { - const term = new EventEmitter(); - setTimeout(() => { - term.emit('exit', 0); - }, 10); - return term; - }); - - const writeJsonMock = jest.spyOn(fs, 'writeJsonSync'); - - try { - await pluginsGateway.homebridgeUpdate(client, { version: 'latest' }); - } catch (e) { } - - // the save config method should not have been called - expect(writeJsonMock).not.toHaveBeenCalled(); - }); - afterAll(async () => { await app.close(); });