Files
dewedev/node_modules/static-eval/test/prop.js
dwindown 7f2dd5260f Initial commit: Developer Tools MVP with visual editor
- Complete React app with 7 developer tools
- JSON Tool with visual structured editor
- Serialize Tool with visual structured editor
- URL, Base64, CSV/JSON, Beautifier, Diff tools
- Responsive navigation with dropdown menu
- Dark/light mode toggle
- Mobile-responsive design with sticky header
- All tools working with copy/paste functionality
2025-08-02 09:31:26 +07:00

17 lines
455 B
JavaScript

var test = require('tape');
var evaluate = require('../');
var parse = require('esprima').parse;
test('function property', function (t) {
t.plan(1);
var src = '[1,2,3+4*10+n,beep.boop(3+5),obj[""+"x"].y]';
var ast = parse(src).body[0].expression;
var res = evaluate(ast, {
n: 6,
beep: { boop: function (x) { return x * 100 } },
obj: { x: { y: 555 } }
});
t.deepEqual(res, [ 1, 2, 49, 800, 555 ]);
});