fix spec
This commit is contained in:
parent
919be67cd2
commit
2c0494dcef
2 changed files with 12 additions and 7 deletions
|
@ -95,7 +95,6 @@ describe('app module', function () {
|
||||||
|
|
||||||
this.timeout(5000)
|
this.timeout(5000)
|
||||||
|
|
||||||
var port
|
|
||||||
var w = null
|
var w = null
|
||||||
var certPath = path.join(__dirname, 'fixtures', 'certificates')
|
var certPath = path.join(__dirname, 'fixtures', 'certificates')
|
||||||
var options = {
|
var options = {
|
||||||
|
@ -115,9 +114,6 @@ describe('app module', function () {
|
||||||
res.end('authorized');
|
res.end('authorized');
|
||||||
}
|
}
|
||||||
})
|
})
|
||||||
server.listen(0, '127.0.0.1', function () {
|
|
||||||
port = server.address().port
|
|
||||||
})
|
|
||||||
|
|
||||||
afterEach(function () {
|
afterEach(function () {
|
||||||
if (w != null) {
|
if (w != null) {
|
||||||
|
@ -141,12 +137,21 @@ describe('app module', function () {
|
||||||
done()
|
done()
|
||||||
})
|
})
|
||||||
|
|
||||||
|
app.on('select-client-certificate', function (event, webContents, url, list, callback) {
|
||||||
|
assert.equal(list.length, 1)
|
||||||
|
assert.equal(list[0].issuerName, 'Intermediate CA')
|
||||||
|
callback(list[0])
|
||||||
|
})
|
||||||
|
|
||||||
app.importClientCertificate(options, function (result) {
|
app.importClientCertificate(options, function (result) {
|
||||||
assert(!result)
|
assert(!result)
|
||||||
|
server.listen(0, '127.0.0.1', function () {
|
||||||
|
var port = server.address().port
|
||||||
w.loadURL(`https://127.0.0.1:${port}`)
|
w.loadURL(`https://127.0.0.1:${port}`)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
})
|
||||||
|
|
||||||
describe('BrowserWindow events', function () {
|
describe('BrowserWindow events', function () {
|
||||||
var w = null
|
var w = null
|
||||||
|
|
Loading…
Add table
Reference in a new issue