Redeclare process/global as strings
This commit is contained in:
parent
4e5b8ac3ee
commit
e99b1709d9
3 changed files with 4 additions and 4 deletions
2
spec/fixtures/module/declare-global.js
vendored
2
spec/fixtures/module/declare-global.js
vendored
|
@ -1,2 +1,2 @@
|
||||||
const global = {__global: true}
|
const global = 'declared global'
|
||||||
module.exports = global
|
module.exports = global
|
||||||
|
|
2
spec/fixtures/module/declare-process.js
vendored
2
spec/fixtures/module/declare-process.js
vendored
|
@ -1,2 +1,2 @@
|
||||||
const process = require('process')
|
const process = 'declared process'
|
||||||
module.exports = process
|
module.exports = process
|
||||||
|
|
|
@ -51,13 +51,13 @@ describe('third-party module', function () {
|
||||||
describe('global variables', function () {
|
describe('global variables', function () {
|
||||||
describe('process', function () {
|
describe('process', function () {
|
||||||
it('can be declared in a module', function () {
|
it('can be declared in a module', function () {
|
||||||
assert.strictEqual(require('./fixtures/module/declare-process'), require('process'))
|
assert.strictEqual(require('./fixtures/module/declare-process'), 'declared process')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
||||||
describe('global', function () {
|
describe('global', function () {
|
||||||
it('can be declared in a module', function () {
|
it('can be declared in a module', function () {
|
||||||
assert.deepEqual(require('./fixtures/module/declare-global'), {__global: true})
|
assert.deepEqual(require('./fixtures/module/declare-global'), 'declared global')
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|
Loading…
Reference in a new issue