diff --git a/spec/fixtures/module/declare-buffer.js b/spec/fixtures/module/declare-buffer.js new file mode 100644 index 0000000000..9a054a24b5 --- /dev/null +++ b/spec/fixtures/module/declare-buffer.js @@ -0,0 +1,2 @@ +const Buffer = 'declared Buffer' +module.exports = Buffer diff --git a/spec/modules-spec.js b/spec/modules-spec.js index b8c02a2e3e..5f82717527 100644 --- a/spec/modules-spec.js +++ b/spec/modules-spec.js @@ -69,6 +69,12 @@ describe('third-party module', function () { assert.strictEqual(require('./fixtures/module/declare-global'), 'declared global') }) }) + + describe('Buffer', function () { + it('can be declared in a module', function () { + assert.strictEqual(require('./fixtures/module/declare-buffer'), 'declared Buffer') + }) + }) }) })