👷 Properly test x vs y

This commit is contained in:
Felix Rieseberg 2017-12-11 14:05:07 -08:00
parent dfd7598d48
commit f7ebfff8ae

View file

@ -283,41 +283,41 @@ describe('Menu module', () => {
})
it('returns immediately', () => {
const { browserWindow, x, y } = menu.popup(w, {x: 100, y: 100})
const { browserWindow, x, y } = menu.popup(w, {x: 100, y: 101})
assert.equal(browserWindow, w)
assert.equal(x, 100)
assert.equal(y, 100)
assert.equal(y, 101)
menu.closePopup(w)
})
it('works without a given BrowserWindow and options', () => {
const { browserWindow, x, y } = menu.popup({x: 100, y: 100})
const { browserWindow, x, y } = menu.popup({x: 100, y: 101})
assert.equal(browserWindow.constructor.name, 'BrowserWindow')
assert.equal(x, 100)
assert.equal(y, 100)
assert.equal(y, 101)
menu.closePopup()
})
it('works without a given BrowserWindow', () => {
const { browserWindow, x, y } = menu.popup(100, 100)
const { browserWindow, x, y } = menu.popup(100, 101)
assert.equal(browserWindow.constructor.name, 'BrowserWindow')
assert.equal(x, 100)
assert.equal(y, 100)
assert.equal(y, 101)
menu.closePopup()
})
it('works with a given BrowserWindow and no options', () => {
const { browserWindow, x, y } = menu.popup(w, 100, 100)
const { browserWindow, x, y } = menu.popup(w, 100, 101)
assert.equal(browserWindow, w)
assert.equal(x, 100)
assert.equal(y, 100)
assert.equal(y, 101)
menu.closePopup(w)
})