Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

failing assign implicit test

  • Loading branch information...
commit f6ce4b23f379b7e0e4f141b06d6b848f900b6310 1 parent f5a057e
@substack authored
Showing with 15 additions and 0 deletions.
  1. +13 −0 test/assign_implicit.js
  2. +2 −0  test/files/assign_implicit.js
View
13 test/assign_implicit.js
@@ -0,0 +1,13 @@
+var test = require('tape');
+var detect = require('../');
+var fs = require('fs');
+var src = fs.readFileSync(__dirname + '/files/assign_implicit.js');
+
+test('assign from an implicit global', function (t) {
+ t.plan(3);
+
+ var scope = detect(src);
+ t.same(scope.globals.implicit, [ 'bar' ]);
+ t.same(scope.globals.exported, []);
+ t.same(scope.locals, { '': [ 'foo' ] });
+});
View
2  test/files/assign_implicit.js
@@ -0,0 +1,2 @@
+var foo;
+foo = bar;
Please sign in to comment.
Something went wrong with that request. Please try again.