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

[Documentation] Provide clearer instructions on how to use transpilers #1100

Closed
Niceplace opened this issue May 28, 2018 · 4 comments
Closed

Comments

@Niceplace
Copy link

Niceplace commented May 28, 2018

After a good amount of reading / searching, I still can't wrap my head around how exactly I can run cucumber-js with Typescript. I understand --compiler was removed in favor of --require-module but I fail to find concrete examples that use simply cucumber-js + typescript (not with Protractor, not with Nightwatch or any other test framework) to illustrate the process.

  • How would one run the cucumber-js app with ts-node ?

Right now, I'm using cucumber-js --require-module ts-node/register in my package.json (cucumber-js is installed locally, not globally), is this correct ?

  • How exactly am I supposed to load support files ? Do I have to explicitely --require stuff inside support and step_definitions with the use of CLI flags or having the proper folder structure takes care of this ?

Right now, my folder structure looks like this :

- [root app folder]
-- package.json
-- features/
---- myExample.feature
---- step_definitions/
------ myExample.ts
---- support/
------ customWorld.ts

When I run the tests, I get an output specifying that all steps in my feature file are undefined, I think this might be a transpiling issue but I'm not sure.

@hdorgeval
Copy link

Hi @Niceplace, this repo may help you: cucumber-ts-starter

@charlierudolph
Copy link
Member

@charlierudolph
Copy link
Member

Closing for now. Please reopen if you think we can structure our documentation better. Maybe we should add a top level link to transpilers?

@lock
Copy link

lock bot commented Dec 22, 2019

This thread has been automatically locked since there has not been any recent activity after it was closed. Please open a new issue for related bugs.

@lock lock bot locked as resolved and limited conversation to collaborators Dec 22, 2019
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants