publiclab / image-sequencer

A pure JavaScript sequential image processing system, inspired by storyboards
https://sequencer.publiclab.org
GNU General Public License v3.0
110 stars 210 forks source link

ES6 => error in base tests, though not triggering a test failure #1810

Open jywarren opened 3 years ago

jywarren commented 3 years ago

In base tests i see this error at the top:

> image-sequencer@3.6.0 test /home/runner/work/image-sequencer/image-sequencer
> TEST=true istanbul cover tape test/core/*.js test/core/ui/user-interface.js test/core/modules/*.js | tap-spec;

Transformation error; return original code
Error: Line 67: Unexpected token =>
    Failed to parse file: /home/runner/work/image-sequencer/image-sequencer/src/modules/MinifyImage/Module.js
    at constructError (/home/runner/work/image-sequencer/image-sequencer/node_modules/istanbul/node_modules/esprima/esprima.js:2407:21)
    at createError (/home/runner/work/image-sequencer/image-sequencer/node_modules/istanbul/node_modules/esprima/esprima.js:2426:17)
    at unexpectedTokenError (/home/runner/work/image-sequencer/image-sequencer/node_modules/istanbul/node_modules/esprima/esprima.js:2500:13)
    at throwUnexpectedToken (/home/runner/work/image-sequencer/image-sequencer/node_modules/istanbul/node_modules/esprima/esprima.js:2505:15)
    at expect (/home/runner/work/image-sequencer/image-sequencer/node_modules/istanbul/node_modules/esprima/esprima.js:2523:13)
    at parseGroupExpression (/home/runner/work/image-sequencer/image-sequencer/node_modules/istanbul/node_modules/esprima/esprima.js:3200:9)
    at inheritCoverGrammar (/home/runner/work/image-sequencer/image-sequencer/node_modules/istanbul/node_modules/esprima/esprima.js:2681:18)
    at parsePrimaryExpression (/home/runner/work/image-sequencer/image-sequencer/node_modules/istanbul/node_modules/esprima/esprima.js:3239:20)
    at inheritCoverGrammar (/home/runner/work/image-sequencer/image-sequencer/node_modules/istanbul/node_modules/esprima/esprima.js:2681:18)
    at parseLeftHandSideExpressionAllowCall (/home/runner/work/image-sequencer/image-sequencer/node_modules/istanbul/node_modules/esprima/esprima.js:3414:20) {
  lineNumber: 67,
  description: 'Unexpected token =>',
  index: 2050
}

https://github.com/publiclab/image-sequencer/runs/1904955782#step:6:9

However that job is still passing, oddly. I wonder if it's in the first part of the command:

> TEST=true istanbul cover tape test/core/*.js test/core/ui/user-interface.js test/core/modules/*.js | tap-spec;

and so the failure isn't causing an 0 output because tap-spec works. But, how is tap-spec passing then?

jywarren commented 3 years ago

Noting this is still happening -- https://github.com/publiclab/image-sequencer/runs/2196031191?check_suite_focus=true#step:6:22