From ec4d7eb385f0be08afe7e465bf21fba1ea79257c Mon Sep 17 00:00:00 2001 From: David Chambers Date: Wed, 20 Dec 2017 21:12:07 +0100 Subject: [PATCH] =?UTF-8?q?expose=20=E2=80=98require=E2=80=99=20as=20?= =?UTF-8?q?=E2=80=98=5F=5Fdoctest.require=E2=80=99?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- lib/doctest.js | 1 + test/index.js | 1 + 2 files changed, 2 insertions(+) diff --git a/lib/doctest.js b/lib/doctest.js index 339b2544..8a396d81 100644 --- a/lib/doctest.js +++ b/lib/doctest.js @@ -172,6 +172,7 @@ case 'commonjs': return iifeWrap(unlines([ 'var __doctest = {', + ' require: require,', ' queue: [],', ' enqueue: function(io) { this.queue.push(io); }', '};', diff --git a/test/index.js b/test/index.js index 8a01e8f8..724def7e 100644 --- a/test/index.js +++ b/test/index.js @@ -249,6 +249,7 @@ testCommand( stdout: unlines([ 'void function() {', ' var __doctest = {', + ' require: require,', ' queue: [],', ' enqueue: function(io) { this.queue.push(io); }', ' };',