From 67e5157db4e3a015a01cbe960aa555607ecc3219 Mon Sep 17 00:00:00 2001 From: Ben Newman Date: Tue, 23 Feb 2016 16:10:11 -0500 Subject: [PATCH] Test that stub modules can be installed under different names. This relies on the symbolic link functionality provided by meteorInstall. --- tools/tests/apps/modules/package.json | 2 ++ tools/tests/apps/modules/tests.js | 11 +++++++++++ 2 files changed, 13 insertions(+) diff --git a/tools/tests/apps/modules/package.json b/tools/tests/apps/modules/package.json index 87e4246990..80760a1e6d 100644 --- a/tools/tests/apps/modules/package.json +++ b/tools/tests/apps/modules/package.json @@ -10,6 +10,8 @@ "path": "^0.12.7", "regenerator": "^0.8.42", "stream-browserify": "^2.0.1", + "stream-http": "^2.1.1", + "url": "^0.11.0", "util": "^0.10.3" }, "scripts": { diff --git a/tools/tests/apps/modules/tests.js b/tools/tests/apps/modules/tests.js index ffb93b17b1..3ea26630bf 100644 --- a/tools/tests/apps/modules/tests.js +++ b/tools/tests/apps/modules/tests.js @@ -195,6 +195,17 @@ describe("native node_modules", () => { assert.strictEqual(typeof Stream, "function"); assert.strictEqual(typeof Stream.Readable, "function"); }); + + Meteor.isClient && + it("can be installed with aliases", () => { + meteorInstall({ + node_modules: { + http: "stream-http" + } + }); + + assert.strictEqual(require("http"), require("stream-http")); + }); }); describe("local node_modules", () => {