spec: add helper to resolve property getters
This commit is contained in:
parent
558fff69e7
commit
91cc453ccc
2 changed files with 9 additions and 1 deletions
|
@ -10,6 +10,7 @@ const qs = require('querystring')
|
|||
const http = require('http')
|
||||
const { closeWindow } = require('./window-helpers')
|
||||
const { emittedOnce } = require('./events-helpers')
|
||||
const { resolverGetters } = require('./assert-helpers')
|
||||
const { ipcRenderer, remote, screen } = require('electron')
|
||||
const { app, ipcMain, BrowserWindow, BrowserView, protocol, session, webContents } = remote
|
||||
|
||||
|
@ -1729,7 +1730,7 @@ describe('BrowserWindow module', () => {
|
|||
assert.strictEqual(test.pid, w.webContents.getOSProcessId())
|
||||
assert.strictEqual(test.arch, remote.process.arch)
|
||||
assert.strictEqual(test.platform, remote.process.platform)
|
||||
assert.deepStrictEqual(test.env, remote.process.env)
|
||||
assert.deepStrictEqual(...resolverGetters(test.env, remote.process.env))
|
||||
assert.strictEqual(test.execPath, remote.process.helperExecPath)
|
||||
assert.strictEqual(test.resourcesPath, remote.process.resourcesPath)
|
||||
assert.strictEqual(test.sandboxed, true)
|
||||
|
|
7
spec/assert-helpers.js
Normal file
7
spec/assert-helpers.js
Normal file
|
@ -0,0 +1,7 @@
|
|||
function resolverGetters (...args) {
|
||||
return args.map(o => JSON.parse(JSON.stringify(o)))
|
||||
}
|
||||
|
||||
module.exports = {
|
||||
resolverGetters,
|
||||
}
|
Loading…
Add table
Reference in a new issue