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

Clean-up after Jest to Vitest switch in API #16462

Merged
merged 2 commits into from Nov 15, 2022
Merged

Clean-up after Jest to Vitest switch in API #16462

merged 2 commits into from Nov 15, 2022

Conversation

paescuj
Copy link
Member

@paescuj paescuj commented Nov 15, 2022

Description

Just some corrections after the Jest to Vitest switch in the API (#16263).

@rijkvanzanten I think I prefer to have the tests type checked as well, but I'm unsure about the best practice here... I included the tests again (in tsconfig.json) and fixed the type errors, but if you prefer to exclude them I will gladly undo it!

  • Bugfix
  • Improvement
  • New Feature
  • Refactor / codestyle updates
  • Other, please describe:

Requirements Checklist

  • New / updated tests are included
  • All tests are passing locally
  • Performed a self-review of the submitted code

If adding a new feature:

  • Documentation was added/updated. PR:

@rijkvanzanten
Copy link
Member

@paescuj I'd like type checking enabled in tests, as long as they're not included in the output build

@paescuj
Copy link
Member Author

paescuj commented Nov 15, 2022

@paescuj I'd like type checking enabled in tests, as long as they're not included in the output build

Okay, great! Actually, with #16374 those files are now excluded from the published package:

"files": [
"dist",
"!**/*.test.js",
"!**/__*__/"
],

Or do you mean to also not having them in the dist folder in the local dev environment? Edit: In that case we could, for example, use two different tsconfig.js files - one for testing & one for building

@rijkvanzanten
Copy link
Member

Ah right on, that's all we need then! I don't mind them existing in local dist, as long as we don't upload them to npm needlessly

@rijkvanzanten rijkvanzanten merged commit 45eb494 into directus:main Nov 15, 2022
@paescuj paescuj deleted the vitest-api-cleanup branch November 15, 2022 22:24
@rijkvanzanten rijkvanzanten added this to the Next Release milestone Nov 17, 2022
@github-actions github-actions bot locked as resolved and limited conversation to collaborators Jan 31, 2024
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

2 participants