Closed wmeints closed 7 years ago
What about?
beforeLaunch: function() { require('ts-node').register(); },
I have no experience at all with protractor. When cucumberjs
is run from the command line it requires all the .js files in the working folder, or from whatever you have specified via the -r
option.
Maybe you could call bootstrap the ts-node side of things by supplying an index.js file to the -r
option, which then does a call to require("ts-node").register();
to set things up.
I found a working solution for the issues I had with this. It turns out you can register a different compiler in the cucumberOpts. Combine that with this package and you got yourself typescript based tests.
I Wrote a blogpost about it if anyone's interested: http://fizzylogic.nl/2016/10/14/How-to-write-ATDD-tests-with-cucumber-js-protractor-and-typescript/
Hi, I'm looking into using this library in combination with ts-node and protractor. I configured my protractor so that it uses cucumber and sets the ts-node as the compiler for the step definitions
I am wondering whether this is supported at all. Or do you need to compile the step definitions first for them to work properly with cucumber?