From 997f3f31d2c05f605753d24f0d47e8c52313a394 Mon Sep 17 00:00:00 2001 From: Felix Rieseberg Date: Tue, 5 Dec 2017 11:31:40 -0800 Subject: [PATCH] :construction_worker: Cleanup after the test --- spec/api-app-spec.js | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/spec/api-app-spec.js b/spec/api-app-spec.js index 89a68e1f9e2a..0fb1c9777e3e 100644 --- a/spec/api-app-spec.js +++ b/spec/api-app-spec.js @@ -520,6 +520,17 @@ describe('app module', () => { } }) + after(function (done) { + const protocolKey = new Winreg({ + hive: Winreg.HKCU, + key: `\\Software\\Classes\\${protocol}` + }) + + // The last test leaves the registry dirty, + // delete the protocol key for those of us who test at home + protocolKey.destroy(() => done()) + }) + beforeEach(() => { app.removeAsDefaultProtocolClient(protocol) app.removeAsDefaultProtocolClient(protocol, updateExe, processStartArgs)