Add root describe to be able to run whole file

This commit is contained in:
Kevin Sawicki 2017-04-20 10:48:17 -07:00
parent e95ba067a5
commit 93603882b1

View file

@ -1,15 +1,14 @@
const assert = require('assert')
const Module = require('module')
const path = require('path')
const temp = require('temp')
const {remote} = require('electron')
const {BrowserWindow} = remote
const {closeWindow} = require('./window-helpers')
describe('third-party module', function () {
describe('modules support', function () {
var fixtures = path.join(__dirname, 'fixtures')
temp.track()
describe('third-party module', function () {
if (process.platform !== 'win32' || process.execPath.toLowerCase().indexOf('\\out\\d\\') === -1) {
describe('runas', function () {
it('can be required in renderer', function () {
@ -59,6 +58,7 @@ describe('third-party module', function () {
assert.strictEqual(require('./fixtures/module/test.coffee'), true)
})
})
})
describe('global variables', function () {
describe('process', function () {
@ -79,9 +79,8 @@ describe('third-party module', function () {
})
})
})
})
describe('Module._nodeModulePaths', function () {
describe('Module._nodeModulePaths', function () {
describe('when the path is inside the resources path', function () {
it('does not include paths outside of the resources path', function () {
let modulePath = process.resourcesPath
@ -131,9 +130,9 @@ describe('Module._nodeModulePaths', function () {
])
})
})
})
})
describe('require', () => {
describe('require', () => {
describe('when loaded URL is not file: protocol', () => {
let w
@ -154,4 +153,5 @@ describe('require', () => {
assert.equal(result, 'function')
})
})
})
})