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

Lack of intellisense in spec/test files in generated node app #18434

Closed
1 of 4 tasks
joaoschoen opened this issue Aug 2, 2023 · 2 comments
Closed
1 of 4 tasks

Lack of intellisense in spec/test files in generated node app #18434

joaoschoen opened this issue Aug 2, 2023 · 2 comments
Assignees
Labels
outdated scope: node Issues related to Node, Express, NestJS support for Nx scope: testing tools Issues related to Cypress / Jest / Playwright / Vitest support in Nx type: bug

Comments

@joaoschoen
Copy link

Current Behavior

When the application is generated, the tsconfig.spec.ts inside the app has the following code:
"include": [ "jest.config.ts", "src/**/*.test.ts", "src/**/*.spec.ts", "src/**/*.d.ts" ]
This makes it so TS doesn't know about .ts files for the sake of autocomplete and import suggestion.

Expected Behavior

Change it to:
"include": [ "jest.config.ts", "src/**/*.ts", "src/**/*.test.ts", "src/**/*.spec.ts", "src/**/*.d.ts" ]
This way test files will automatically have intellisense.

GitHub Repo

No response

Steps to Reproduce

  1. Generate Node app using:
    nx g @nx/node:application <appname>

Nx Report

Node   : 18.12.1
   OS     : win32-x64
   npm    : 9.8.0

   nx (global)        : 16.6.0
   nx                 : 16.6.0
   @nx/js             : 16.6.0
   @nx/jest           : 16.6.0
   @nx/linter         : 16.6.0
   @nx/workspace      : 16.6.0
   @nx/devkit         : 16.6.0
   @nx/esbuild        : 16.6.0
   @nx/eslint-plugin  : 16.6.0
   @nx/node           : 16.6.0
   @nrwl/tao          : 16.6.0
   typescript         : 5.1.6

Failure Logs

No response

Operating System

  • macOS
  • Linux
  • Windows
  • Other (Please specify)

Additional Information

No response

@AgentEnder AgentEnder added scope: node Issues related to Node, Express, NestJS support for Nx scope: testing tools Issues related to Cypress / Jest / Playwright / Vitest support in Nx labels Aug 11, 2023
@barbados-clemens barbados-clemens self-assigned this Aug 31, 2023
@barbados-clemens
Copy link
Contributor

Closing as, this is a larger topic at hand and simply adding the ts globs most likely isn't the best solution long term for all workspaces. Other projects using the solution based approach also encounters similar behavior.

People can add 'src/**/*.ts' for their workspaces if they desire but for now it won't be generated until a larger investigation is taken place into the TS setup for Nx. For updates follow #3106

@barbados-clemens barbados-clemens closed this as not planned Won't fix, can't repro, duplicate, stale Sep 11, 2023
@github-actions
Copy link

This issue has been closed for more than 30 days. If this issue is still occuring, please open a new issue with more recent context.

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Oct 12, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
outdated scope: node Issues related to Node, Express, NestJS support for Nx scope: testing tools Issues related to Cypress / Jest / Playwright / Vitest support in Nx type: bug
Projects
None yet
Development

Successfully merging a pull request may close this issue.

3 participants