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 208 forks source link

ES6 failure in tests #1245

Open jywarren opened 5 years ago

jywarren commented 5 years ago

https://travis-ci.org/publiclab/image-sequencer/jobs/579551472 is showing an ES6 failure to recognize the => syntax, although that doesn't seem to be what's failing. So, two issues: first that we should either change that syntax or be sure it works in tests, and second, we should make sure tests fail when an error like this pops up!

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

It's in this file, btw! Failed to parse file: /home/travis/build/publiclab/image-sequencer/src/modules/MinifyImage/Module.js

jywarren commented 4 years ago

Hi @Divy123 what do you think of this? Thanks!

vaibhavmatta commented 4 years ago

Hey @jywarren , Sorry, I was bit busy due to my university exams. I am back to the field now. May I try to figure out the solution for this issue? Thanks

harshkhandeparkar commented 4 years ago

Yes sure.

harshkhandeparkar commented 4 years ago

BTW, @jywarren we have babelify as a dependency. We can use it to babelify the tests before running them. I had run into a similar issue some time back so I had added babelify but I think I somehow circumvented the issue but forgot to remove the dep. It may be helpful now.

keshav234156 commented 4 years ago

@jywarren @HarshKhandeparkar the problem is with the istanbul version in package.json changing"istanbul": "^0.4.5" to "istanbul": "^1.0.0-alpha.2" works.Had tried it locally.Should i open a PR which fixes this issue??

vaibhavmatta commented 4 years ago

@jywarren @HarshKhandeparkar Is the issue solved now?

harshkhandeparkar commented 4 years ago

I think so. There is an open PR. You can review the PR if you want.

vaibhavmatta commented 4 years ago

Alright.! Thanks

rishabhshuklax commented 4 years ago

I want to work on this issue!

Divy123 commented 4 years ago

Assigned to @blurry-x-face .

Divy123 commented 4 years ago

I guess this is solved. you may look into another issue. Thanks for your help.