Redeclare process/global as strings

This commit is contained in:
Kevin Sawicki 2017-01-30 09:58:44 -08:00
parent 4e5b8ac3ee
commit e99b1709d9
3 changed files with 4 additions and 4 deletions

View file

@ -1,2 +1,2 @@
const global = {__global: true}
const global = 'declared global'
module.exports = global

View file

@ -1,2 +1,2 @@
const process = require('process')
const process = 'declared process'
module.exports = process

View file

@ -51,13 +51,13 @@ describe('third-party module', function () {
describe('global variables', function () {
describe('process', 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 () {
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')
})
})
})