👷 Cleanup after the test
This commit is contained in:
parent
e77751aab5
commit
997f3f31d2
1 changed files with 11 additions and 0 deletions
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue