masala-parser
masala-parser copied to clipboard
Put speed test apart unit-test
trafficstars
Cover tool will run it ultra slow
'expect complex calcul to true and lightening fast': function (test) {
const calculus = '3 +2*4 -((2*45-78)*2*(6*(9-8)+3*(2-5) ))';
let time = new Date().getTime();
let parsing = multParser().parse(stream.ofString(calculus));
time = new Date().getTime() - time;
test.equal(parsing.value, 83, 'complex multiplication');
// Should be 10 ; Unfortunately cover Agent will make it ultra slow
test.ok(time < 200, 'parsing is too slow');
test.done();
},