Skip to content
This repository has been archived by the owner on Nov 4, 2024. It is now read-only.

Commit

Permalink
Bolt context onto repl instances to avoid Node 10.2.0+ regression.
Browse files Browse the repository at this point in the history
  • Loading branch information
jdalton committed May 25, 2018
1 parent 1a5fb78 commit 9048995
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions test/repl-hook-tests.mjs
Original file line number Diff line number Diff line change
Expand Up @@ -111,6 +111,7 @@ describe("repl hook", () => {

assert.strictEqual(typeof context.localAssert, "undefined")

r.context = context
r.eval(code, context, "repl", () => {
assert.strictEqual(typeof context.localAssert, "function")
})
Expand All @@ -123,6 +124,7 @@ describe("repl hook", () => {
const r = repl.start({})
const code = "var exports = module.exports"

r.context = context
r.eval(code, context, "repl", () => {
assert.ok(isPlainObject(context.exports))
})
Expand All @@ -138,6 +140,7 @@ describe("repl hook", () => {
'var dynamic = import("' + pkgURL + '")'
].join("\n")

r.context = context
r.eval(code, context, "repl", () => {
context.dynamic
.then((dynamic) => {
Expand Down

0 comments on commit 9048995

Please sign in to comment.