👷 Cleanup after the test

This commit is contained in:
Felix Rieseberg 2017-12-05 11:31:40 -08:00
parent e77751aab5
commit 997f3f31d2

View file

@ -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(() => { beforeEach(() => {
app.removeAsDefaultProtocolClient(protocol) app.removeAsDefaultProtocolClient(protocol)
app.removeAsDefaultProtocolClient(protocol, updateExe, processStartArgs) app.removeAsDefaultProtocolClient(protocol, updateExe, processStartArgs)