Skip to content

Commit

Permalink
nested test passes too hooray
Browse files Browse the repository at this point in the history
  • Loading branch information
James Halliday committed Jun 18, 2011
1 parent db98822 commit b0e8032
Show file tree
Hide file tree
Showing 2 changed files with 30 additions and 0 deletions.
22 changes: 22 additions & 0 deletions test/files/nested.js
@@ -0,0 +1,22 @@

if (true) {
(function () {
require('a');
})();
}
if (false) {
(function () {
var x = 10;
switch (x) {
case 1 : require('b'); break;
default : break;
}
})()
}

function qqq () {
require
(
"c"
);
}
8 changes: 8 additions & 0 deletions test/nested.js
@@ -0,0 +1,8 @@
var assert = require('assert');
var detective = require('../');
var fs = require('fs');
var src = fs.readFileSync(__dirname + '/files/nested.js');

exports.nested = function () {
assert.deepEqual(detective(src), [ 'a', 'b', 'c' ]);
};

0 comments on commit b0e8032

Please sign in to comment.