Merge pull request #9237 from electron/root-modules-describe

Add root describe to modules spec
This commit is contained in:
Kevin Sawicki 2017-04-20 15:11:27 -07:00 committed by GitHub
commit 1a49374b4c

View file

@ -1,15 +1,14 @@
const assert = require('assert') const assert = require('assert')
const Module = require('module') const Module = require('module')
const path = require('path') const path = require('path')
const temp = require('temp')
const {remote} = require('electron') const {remote} = require('electron')
const {BrowserWindow} = remote const {BrowserWindow} = remote
const {closeWindow} = require('./window-helpers') const {closeWindow} = require('./window-helpers')
describe('third-party module', function () { describe('modules support', function () {
var fixtures = path.join(__dirname, 'fixtures') var fixtures = path.join(__dirname, 'fixtures')
temp.track()
describe('third-party module', function () {
if (process.platform !== 'win32' || process.execPath.toLowerCase().indexOf('\\out\\d\\') === -1) { if (process.platform !== 'win32' || process.execPath.toLowerCase().indexOf('\\out\\d\\') === -1) {
describe('runas', function () { describe('runas', function () {
it('can be required in renderer', 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) assert.strictEqual(require('./fixtures/module/test.coffee'), true)
}) })
}) })
})
describe('global variables', function () { describe('global variables', function () {
describe('process', function () { describe('process', function () {
@ -79,7 +79,6 @@ describe('third-party module', function () {
}) })
}) })
}) })
})
describe('Module._nodeModulePaths', function () { describe('Module._nodeModulePaths', function () {
describe('when the path is inside the resources path', function () { describe('when the path is inside the resources path', function () {
@ -155,3 +154,4 @@ describe('require', () => {
}) })
}) })
}) })
})