[Pkg-javascript-commits] [node-lexical-scope] 36/83: failing return hash 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 f470ae3cf85832d2cee19a11f3e3e6710df453b9
Author: James Halliday <mail at substack.net>
Date:   Sat Mar 30 12:11:56 2013 -0700

    failing return hash test
---
 test/files/return_hash.js |  5 +++++
 test/return_hash.js       | 13 +++++++++++++
 2 files changed, 18 insertions(+)

diff --git a/test/files/return_hash.js b/test/files/return_hash.js
new file mode 100644
index 0000000..8cdd57b
--- /dev/null
+++ b/test/files/return_hash.js
@@ -0,0 +1,5 @@
+function foo() {
+  return {
+    bar: true
+  }
+}
diff --git a/test/return_hash.js b/test/return_hash.js
new file mode 100644
index 0000000..442d91a
--- /dev/null
+++ b/test/return_hash.js
@@ -0,0 +1,13 @@
+var test = require('tape');
+var detect = require('../');
+var fs = require('fs');
+var src = fs.readFileSync(__dirname + '/files/return_hash.js');
+
+test('return hash', 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': [], '': [ 'foo' ] });
+});

-- 
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