I am exploring JavaScript es6 code in angularjs app and used grunt babel to compile the es6 to es5.
My unit test (jasmine) doesn\'t run with es6 code using phantomjs
I spent quite some time to make babel & jasmine to cooperate, so i should post my solution here:
install babel-cli
package, do standard babel config (for me it was .babelrc
file)
i created custom runner file: bin/jasmine
#!/usr/bin/env bash
./node_modules/.bin/babel-node ./node_modules/.bin/jasmine $@ --config=spec/support/jasmine.json
that way even passing arguments works! bin/jasmine -h
while path to config conveniently always defined