Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

nested test passes too hooray

  • Loading branch information...
commit b0e803262467c8463ff915c8ba94404f57b0be40 1 parent db98822
@substack authored
Showing with 30 additions and 0 deletions.
  1. +22 −0 test/files/nested.js
  2. +8 −0 test/nested.js
View
22 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"
+ );
+}
View
8 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' ]);
+};
Please sign in to comment.
Something went wrong with that request. Please try again.