Test that stub modules can be installed under different names.

This relies on the symbolic link functionality provided by meteorInstall.
This commit is contained in:
Ben Newman
2016-02-23 16:10:11 -05:00
parent 0efd8b7bef
commit 67e5157db4
2 changed files with 13 additions and 0 deletions

View File

@@ -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": {

View File

@@ -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", () => {