Use equal/deepEqual for channel/args asserts

This commit is contained in:
Kevin Sawicki 2016-10-28 11:14:14 -07:00
parent dda3fcef91
commit 611614c649

View file

@ -903,8 +903,8 @@ describe('<webview> tag', function () {
it('emits when using navigator.getUserMedia api', function (done) {
webview.addEventListener('ipc-message', function (e) {
assert(e.channel, 'message')
assert(e.args, ['PermissionDeniedError'])
assert.equal(e.channel, 'message')
assert.deepEqual(e.args, ['PermissionDeniedError'])
done()
})
webview.src = 'file://' + fixtures + '/pages/permissions/media.html'
@ -916,8 +916,8 @@ describe('<webview> tag', function () {
it('emits when using navigator.geolocation api', function (done) {
webview.addEventListener('ipc-message', function (e) {
assert(e.channel, 'message')
assert(e.args, ['ERROR(1): User denied Geolocation'])
assert.equal(e.channel, 'message')
assert.deepEqual(e.args, ['User denied Geolocation'])
done()
})
webview.src = 'file://' + fixtures + '/pages/permissions/geolocation.html'
@ -929,8 +929,8 @@ describe('<webview> tag', function () {
it('emits when using navigator.requestMIDIAccess api', function (done) {
webview.addEventListener('ipc-message', function (e) {
assert(e.channel, 'message')
assert(e.args, ['SecurityError'])
assert.equal(e.channel, 'message')
assert.deepEqual(e.args, ['SecurityError'])
done()
})
webview.src = 'file://' + fixtures + '/pages/permissions/midi.html'