Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

babel compiler with cucumber.js version 4

with cucumber@1, I could run tests that needed transpiling like this

cucumberjs --compiler js:babel-core/register

but that doesn't work with cucumber@4

node_modules/.bin/cucumber-js --help

doesn't list the --compiler option anymore

it doesn't complain when I put the option in, but when it gets to the first jsx angle bracket, it complains.

like image 248
Alex028502 Avatar asked Oct 16 '22 18:10

Alex028502


1 Answers

When you run node_modules/.bin/cucumber-js --help you can see that the option to require a node module before requiring files is --require-module so an example would be ./node_modules/.bin/cucumber-js --require-module @babel/register test/features

like image 159
Stefanvdk Avatar answered Oct 20 '22 23:10

Stefanvdk