Skip to content
Browse files

added test for #51

  • Loading branch information...
1 parent 9aca330 commit c4b4568caadae6905464a94d47dd8014043f3505 @fb55 fb55 committed
Showing with 18 additions and 0 deletions.
  1. +10 −0 test/example-apps-test.js
  2. +3 −0 test/fixtures/delayed-require/index.js
  3. +5 −0 test/fixtures/delayed-require/other.js
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);
+};

0 comments on commit c4b4568

Please sign in to comment.
Something went wrong with that request. Please try again.