Book a Demo!
CoCalc Logo Icon
StoreFeaturesDocsShareSupportNewsAboutPoliciesSign UpSign In
Download
80540 views
1
var test = require('tape');
2
var detect = require('../');
3
var fs = require('fs');
4
var src = fs.readFileSync(__dirname + '/files/return_hash.js');
5
6
test('return hash', function (t) {
7
t.plan(3);
8
9
var scope = detect(src);
10
t.same(scope.globals.implicit, []);
11
t.same(scope.globals.exported, []);
12
t.same(scope.locals, { 'body.0': [], '': [ 'foo' ] });
13
});
14
15