[Pkg-javascript-commits] [node-lexical-scope] 26/83: failing argument test
Bastien Roucariès
rouca at moszumanska.debian.org
Fri Dec 15 09:45:47 UTC 2017
This is an automated email from the git hooks/post-receive script.
rouca pushed a commit to branch master
in repository node-lexical-scope.
commit 5554e2b3fe369fd304a8f4dd428a6e719fabf2ba
Author: James Halliday <mail at substack.net>
Date: Fri Mar 29 23:25:50 2013 -0700
failing argument test
---
test/argument.js | 16 ++++++++++++++++
test/files/argument.js | 6 ++++++
2 files changed, 22 insertions(+)
diff --git a/test/argument.js b/test/argument.js
new file mode 100644
index 0000000..1576f40
--- /dev/null
+++ b/test/argument.js
@@ -0,0 +1,16 @@
+var test = require('tape');
+var detect = require('../');
+var src = require('./sources/argument.js');
+
+test('parameters from inline arguments', function (t) {
+ t.plan(3);
+
+ var scope = detect(src);
+ t.same(scope.globals.implicit, []);
+ t.same(scope.globals.exported, []);
+ t.same(scope.locals, {
+ 'body.0': [ 'a' ],
+ '': [ 'foo' ],
+ 'body.0.argument': [ 'c' ]
+ });
+});
diff --git a/test/files/argument.js b/test/files/argument.js
new file mode 100644
index 0000000..55d20e3
--- /dev/null
+++ b/test/files/argument.js
@@ -0,0 +1,6 @@
+function foo () {
+ var a;
+ return function (c) {
+ a = c;
+ };
+}
--
Alioth's /usr/local/bin/git-commit-notice on /srv/git.debian.org/git/pkg-javascript/node-lexical-scope.git
More information about the Pkg-javascript-commits
mailing list