diff --git a/package.json b/package.json index 783eebea5..7ae889a02 100644 --- a/package.json +++ b/package.json @@ -84,6 +84,7 @@ "buffer-shims": "^1.0.0", "concurrently": "^5.3.0", "dotenv": "^8.2.0", + "form-data": "^3.0.0", "jest": "^26.4.2", "lodash": "^4.17.20", "nodemon": "^2.0.4", @@ -131,4 +132,4 @@ "smart home", "hb-service" ] -} \ No newline at end of file +} diff --git a/test/e2e/backup.e2e-spec.ts b/test/e2e/backup.e2e-spec.ts index 002ab22a9..238141b09 100644 --- a/test/e2e/backup.e2e-spec.ts +++ b/test/e2e/backup.e2e-spec.ts @@ -161,6 +161,9 @@ describe('BackupController (e2e)', () => { expect(client.emit).toBeCalledWith('stdout', expect.stringContaining('Restoring backup')); expect(client.emit).toBeCalledWith('stdout', expect.stringContaining('Restore Complete')); expect(pluginsService.installPlugin).toBeCalledWith('homebridge-mock-plugin', client); + + // ensure the temp restore directory was removed + expect(await fs.pathExists(restoreDirectory)).toEqual(false); }); it('GET /backup/restart', async () => {