Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Unable to run tests in es6 branch #538

Open
blikblum opened this issue Dec 31, 2015 · 3 comments
Open

Unable to run tests in es6 branch #538

blikblum opened this issue Dec 31, 2015 · 3 comments

Comments

@blikblum
Copy link
Contributor

Checked master, npm install, run build and test: everything fine

When i checked es6 branch i got a couple of errors:
No babel -> installed locally or global (same effect)
No mocha-phantomjs -> installed global

npm run build > bundled version created fine
npm test -> got the following error:

rivets@0.8.1 pretest D:\repositories\rivets
babel src/parsers.js --out-file spec/lib/parsers.js --modules umd

rivets@0.8.1 test D:\repositories\rivets
mocha-phantomjs spec/runner.html

SyntaxError: Parse error

npm ERR! Test failed. See above for more details.

I checked spec/lib/parsers.js and is using es6 syntax, instead of umd

Using node 4.2 under windows

@blikblum
Copy link
Contributor Author

After installed https://babeljs.io/docs/plugins/transform-es2015-modules-umd/ plugin parsers.js is converted to umd

Running npm test still shows error but opening runner.html in the browser works

@blikblum
Copy link
Contributor Author

When i installed http://babeljs.io/docs/plugins/preset-es2015/ it worked

Now, i realized what was going on: the build step was using babel through babel-loader that uses babel 4, while the test script does not uses webpack (tries to use babel directly) when i did npm intall bable-cli it installed babel 6 that needs a bunch of different configuration

It's "fixed" in my side but i think it needs some tweaking to lower the entry barrier. If will upgrade babel to v6 or stick to v4 is another matter

@blikblum blikblum changed the title Unable to run tests in e6 branch Unable to run tests in es6 branch Jan 5, 2016
agmonks pushed a commit to agmonks/rivets that referenced this issue May 31, 2016
@agmonks
Copy link
Contributor

agmonks commented May 31, 2016

Hit the same issue, have fixed and submitted a PR. Feel free to test!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants