From 94d16514fcfe0c13bcbe61f8b0b03370d702acb1 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Sat, 4 Aug 2018 15:26:57 -0400 Subject: [PATCH] Attempt to reproduce issue #209. --- test/import-tests.js | 5 +++++ test/import/issue-209/child.js | 3 +++ test/import/issue-209/parent.js | 2 ++ 3 files changed, 10 insertions(+) create mode 100644 test/import/issue-209/child.js create mode 100644 test/import/issue-209/parent.js diff --git a/test/import-tests.js b/test/import-tests.js index 7c4c8328..c7126311 100644 --- a/test/import-tests.js +++ b/test/import-tests.js @@ -160,4 +160,9 @@ describe("import declarations", () => { assert.strictEqual(d, _d); assert.strictEqual(e, _e); }); + + it("`import module from ...` should work (issue #209)", () => { + import { childId } from "./import/issue-209/parent"; + assert.strictEqual(childId, __dirname + "/import/issue-209/child.js"); + }); }); diff --git a/test/import/issue-209/child.js b/test/import/issue-209/child.js new file mode 100644 index 00000000..7333a404 --- /dev/null +++ b/test/import/issue-209/child.js @@ -0,0 +1,3 @@ +export default function () { + return module; +} diff --git a/test/import/issue-209/parent.js b/test/import/issue-209/parent.js new file mode 100644 index 00000000..7cb3f654 --- /dev/null +++ b/test/import/issue-209/parent.js @@ -0,0 +1,2 @@ +import module from "./child.js"; +export const childId = module().id;