wallabyjs / atom-wallaby

Wallaby.js atom package starter
Other
57 stars 6 forks source link

SyntaxError: Parse error for "import RorRefactor from '../lib/ror-refactor';" #43

Closed zedtux closed 8 years ago

zedtux commented 8 years ago

I'm developing my very first package in Atom, a package with few refactoring tools for Ruby, and I wanted to give a try to Wallaby.

The installation went well, the wallaby.js file is here, and fine, and the wallaby console running. The first output I got is this:

SyntaxError: Parse error
          at lib/ror-refactor.js:3
SyntaxError: Parse error
          at spec/ror-refactor-spec.js:3

Those mentioned lines are the following:

'use babel';

import RorRefactor from '../lib/ror-refactor';

describe('RorRefactor', () => {
  ...
});

So import RorRefactor from '../lib/ror-refactor'; is not accepted by wallaby while it has been generated like this by the atom package generator package.

I don't see the issue here. Can you please help me?

ArtemGovorov commented 8 years ago

Unfortunately wallaby.js doesn't support Atom packages testing. It only supports running your tests in browser or node.js environment. In this particular case it just doesn't understand what 'use babel'; is. Having said that, if you can run your tests with mocha in node or karma in browser, then wallaby should be able to run them too.

zedtux commented 8 years ago

Too bad :sob:.

ArtemGovorov commented 8 years ago

Please feel free to create the feature request in our main repo at https://github.com/wallabyjs/public/issues