timjroberts / cucumber-js-tsflow

Provides 'specflow' like bindings for Cucumber.js in TypeScript 1.7+.
MIT License
133 stars 34 forks source link

Unexpected identifier #80

Closed Taewa closed 3 years ago

Taewa commented 3 years ago

Hi all,

I am trying to run the cucumber testing with LitElement, Typescript and @open-wc/testing.

POC repo is here: https://github.com/Taewa/cucumber-ts-lit-element

When I run the test npm run test, I get a following error.

(function (exports, require, module, __filename, __dirname) { import chai from './import-wrappers/chai.js';
                                                                     ^^^^
SyntaxError: Unexpected identifier

If I understand correctly, it's the node that doesn't understand import and probably Babel can help me.

But I am not sure how I can add Babel with cucumber-js-tsflow. Is there somewhere I can configure?

Thanks.