Using grigio:babel and Velocity tests


#1

Hi,

I’m using grigio:babel, naming my files foo.es6.js, and it all works pretty well. However, Velocity (using Jasmine) complains on startup:

W20150710-00:35:03.711(1)? (STDERR) [sanjo:jasmine]: The file "...lib/models.es6.js" has syntax errors. [SyntaxError: Unexpected token {]
W20150710-00:35:03.721(1)? (STDERR) [sanjo:jasmine]: The file ".../server/startup.es6.js" has syntax errors. [SyntaxError: Unexpected token {]

Is there a way to have the transpiling happen before Velocity takes the file?

Martin


#2

Don’t use the server and client unit mode. Only use the server and client integration mode. You can also write unit tests with them. By doing this, you should be fine with ES6. I do this and it works without problems.