[Pkg-javascript-commits] [node-lexical-scope] 10/83: easier to run in a browser

Bastien Roucariès rouca at moszumanska.debian.org
Fri Dec 15 09:45:46 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 97d2004219e98e35a6dd723a1219db49e5063b5e
Author: James Halliday <mail at substack.net>
Date:   Mon Feb 18 14:59:05 2013 +1000

    easier to run in a browser
---
 test/detect.js                | 2 +-
 test/sources/detect_source.js | 2 +-
 2 files changed, 2 insertions(+), 2 deletions(-)

diff --git a/test/detect.js b/test/detect.js
index 67c978d..684c7be 100644
--- a/test/detect.js
+++ b/test/detect.js
@@ -1,7 +1,7 @@
 var test = require('tape');
 var detect = require('../');
 var fs = require('fs');
-var src = fs.readFileSync(__dirname + '/sources/detect.js');
+var src = require('./sources/detect_source.js');
 
 test('check locals and globals', function (t) {
     t.plan(3);
diff --git a/test/sources/detect_source.js b/test/sources/detect_source.js
index 63a636b..b463899 100644
--- a/test/sources/detect_source.js
+++ b/test/sources/detect_source.js
@@ -1 +1 @@
-"var x = 5;\nvar y = 3, z = 2;\n\nw.foo();\nw = 2;\n\nRAWR=444;\nRAWR.foo();\n\nBLARG=3;\n\nfoo(function () {\n    var BAR = 3;\n    process.nextTick(function (ZZZZZZZZZZZZ) {\n        console.log('beep boop');\n        var xyz = 4;\n        x += 10;\n        x.zzzzzz;\n        ZZZ=6;\n    });\n    function doom () {\n    }\n    ZZZ.foo();\n\n});\n\nfunction beep () {}\n\nconsole.log(xyz);\n"
\ No newline at end of file
+module.exports = "var x = 5;\nvar y = 3, z = 2;\n\nw.foo();\nw = 2;\n\nRAWR=444;\nRAWR.foo();\n\nBLARG=3;\n\nfoo(function () {\n    var BAR = 3;\n    process.nextTick(function (ZZZZZZZZZZZZ) {\n        console.log('beep boop');\n        var xyz = 4;\n        x += 10;\n        x.zzzzzz;\n        ZZZ=6;\n    });\n    function doom () {\n    }\n    ZZZ.foo();\n\n});\n\nfunction beep () {}\n\nconsole.log(xyz);\n"

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