Native confirm/alert throws differently

This commit is contained in:
Cheng Zhao 2018-03-06 14:06:29 +09:00
parent ca42325ade
commit 90bd1fd7e9

View file

@ -1088,10 +1088,6 @@ describe('chromium feature', () => {
assert.throws(() => {
window.alert({toString: null})
}, /Cannot convert object to primitive value/)
assert.throws(() => {
window.alert('message', {toString: 3})
}, /Cannot convert object to primitive value/)
})
})
@ -1100,10 +1096,6 @@ describe('chromium feature', () => {
assert.throws(() => {
window.confirm({toString: null}, 'title')
}, /Cannot convert object to primitive value/)
assert.throws(() => {
window.confirm('message', {toString: 3})
}, /Cannot convert object to primitive value/)
})
})