[Pkg-javascript-commits] [node-lexical-scope] 30/83: failing named parameter test
Bastien Roucariès
rouca at moszumanska.debian.org
Fri Dec 15 09:45:48 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 00e33372b09eabfacbd73ae5d3b3d7211388d4c2
Author: James Halliday <mail at substack.net>
Date: Sat Mar 30 00:26:07 2013 -0700
failing named parameter test
---
test/argument.js | 13 +++++++++++++
test/files/named_arg.js | 6 ++++++
2 files changed, 19 insertions(+)
diff --git a/test/argument.js b/test/argument.js
index 3ba102d..df97e62 100644
--- a/test/argument.js
+++ b/test/argument.js
@@ -15,3 +15,16 @@ test('parameters from inline arguments', function (t) {
'body.0.argument': [ 'c' ]
});
});
+
+test('named argument parameter', 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', 'x' ],
+ '': [ 'foo' ],
+ 'body.0.argument': [ 'c' ]
+ });
+});
diff --git a/test/files/named_arg.js b/test/files/named_arg.js
new file mode 100644
index 0000000..af6c275
--- /dev/null
+++ b/test/files/named_arg.js
@@ -0,0 +1,6 @@
+function foo (x) {
+ var a = x;
+ 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