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/named_arg.js');
5
6
test('named argument parameter', 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, {
13
'body.0': [ 'a', 'x' ],
14
'': [ 'foo' ],
15
'body.0.body.body.1.argument': [ 'c' ]
16
});
17
});
18
19