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

TypeScript setup: move tsconfig.json to nightwatch/tsconfig.json #33

Open
Tracked by #3300
beatfactor opened this issue Jul 20, 2022 · 0 comments · Fixed by #42
Open
Tracked by #3300

TypeScript setup: move tsconfig.json to nightwatch/tsconfig.json #33

beatfactor opened this issue Jul 20, 2022 · 0 comments · Fixed by #42
Assignees

Comments

@beatfactor
Copy link
Member

beatfactor commented Jul 20, 2022

If setting up Nightwatch in an existing TS project, we need to create the tsconfig.json file that Nightwatch will use inside the nightwatch folder, in the project root.

The nightwatch folder will host other nightwatch related items. The structure will look like so:

nightwatch/
  |--  examples/
  |--  pages/
  |--  commands/  
  |--  assertions/
  |--  globals.ts
  |--  tsconfig.json

Since v2.3, the Nightwatch runner will automatically register ts-node using the nightwatch/tsconfig.json config file which will make it possible to run .ts files without tsc. See https://github.com/nightwatchjs/nightwatch/blob/main/bin/runner.js#L9

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
No open projects
Status: Done
2 participants