Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with
or
.
Download ZIP
Browse files

added test for #51

  • Loading branch information...
commit c4b4568caadae6905464a94d47dd8014043f3505 1 parent 9aca330
@fb55 fb55 authored
View
10 test/example-apps-test.js
@@ -174,5 +174,15 @@ vows.describe('require-analyzer/examples').addBatch({
'writeMyCSS': '0.17.x'
});
}
+ },
+ "When passed an app with delayed & distributed dependencies": {
+ topic: dependencies('./fixtures/delayed-require'),
+ "all dependencies are found": function (err, pkgs){
+ assert.isNull(err);
+ assert.deepEqual(pkgs, {
+ "socket.io": "*",
+ "some_module": "*"
+ });
+ }
}
}).export(module);
View
3  test/fixtures/delayed-require/index.js
@@ -0,0 +1,3 @@
+module.exports = function(a){
+ require("./other.js")(a*2);
+};
View
5 test/fixtures/delayed-require/other.js
@@ -0,0 +1,5 @@
+require("sock" + (function(){return "et.io";}()));
+
+module.exports = function(a){
+ require("some_module").func(a);
+};
Please sign in to comment.
Something went wrong with that request. Please try again.