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(); });