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

Refactor test code to go under a single 'test' folder #8975

Closed
Tracked by #8976
rchiodo opened this issue Feb 10, 2022 · 3 comments
Closed
Tracked by #8976

Refactor test code to go under a single 'test' folder #8975

rchiodo opened this issue Feb 10, 2022 · 3 comments
Assignees
Labels
debt Code quality issues

Comments

@rchiodo
Copy link
Contributor

rchiodo commented Feb 10, 2022

As discussed in our architecture review, this task is to move 'test' related code into a 'test' folder (or whatever you decided to name it).

The main reason for this is to ensure we never reference test related code inside of production code. One way to achieve this is to have a completely separate 'test' folder at the root (instead of under src).

This would include stuff like:

  • standardTest.ts
  • index.ts
  • all *.vscode.test.ts files
  • test helper code

It would NOT include:

  • all unit tests. These would reside next to the code they're testing
@rchiodo rchiodo added the bug Issue identified by VS Code Team member as probable bug label Feb 10, 2022
@rchiodo rchiodo added engineering and removed bug Issue identified by VS Code Team member as probable bug labels Feb 10, 2022
@greazer greazer added debt Code quality issues and removed needs-triage labels Feb 10, 2022
@greazer greazer added this to the February 2022 milestone Feb 10, 2022
@greazer greazer removed this from the February 2022 milestone Feb 24, 2022
@DonJayamanne DonJayamanne self-assigned this Mar 2, 2022
@DonJayamanne
Copy link
Contributor

One way to achieve this is to have a completely separate 'test' folder at the root (instead of under src).

Not moving all of the tests, no need we can use linters to achieve the same requirement.

@rchiodo
Copy link
Contributor Author

rchiodo commented Mar 2, 2022

Not moving all of the tests, no need we can use linters to achieve the same requirement.

Yeah I tried this and it was a huge pain having two root dirs in the tsconfig. Changed relative paths everywhere.

@DonJayamanne
Copy link
Contributor

DonJayamanne commented Mar 3, 2022

Done as per discussion (basically do not move anything, added linters to ensure extension code cannot consume test code)

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Mar 4, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
debt Code quality issues
Projects
None yet
Development

No branches or pull requests

3 participants