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

Can't run tests since imported node modules aren't transpiled #496

Open
fc opened this issue Oct 19, 2018 · 2 comments
Open

Can't run tests since imported node modules aren't transpiled #496

fc opened this issue Oct 19, 2018 · 2 comments

Comments

@fc
Copy link

fc commented Oct 19, 2018

If I do this in a test:

import fetchMock from "fetch-mock";

It will generate this error:

PhantomJS 2.1.1 (Mac OS X 0.0.0) ERROR
  {
    "message": "SyntaxError: Unexpected token 'const'\nat webpack:///node_modules/tr46/index.js:3 <- tests/index-test.js:69813",
    "str": "SyntaxError: Unexpected token 'const'\nat webpack:///node_modules/tr46/index.js:3 <- tests/index-test.js:69813"
  }
@fc
Copy link
Author

fc commented Oct 19, 2018

If I change the browser to ChromeHeadless in nwb.config.js that solves it and maybe solves it for someone else...

  karma: {
    browsers: ["ChromeHeadless"]
  },

@fc fc closed this as completed Oct 19, 2018
@fc fc reopened this Oct 19, 2018
@fc
Copy link
Author

fc commented Oct 19, 2018

Keeping this open since I am still running into issues and it seems like this should be configurable but not clear how to get it to work ?...

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

1 participant