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

Use vitest instead of jest #5821

Merged
merged 16 commits into from
Oct 14, 2024
Merged

Use vitest instead of jest #5821

merged 16 commits into from
Oct 14, 2024

Conversation

max-nextcloud
Copy link
Collaborator

@max-nextcloud max-nextcloud commented May 22, 2024

📝 Summary

🏁 Checklist

  • Code is properly formatted (npm run lint / npm run stylelint / composer run cs:check)
  • Sign-off message is added to all commits
  • Tests (unit, integration and/or end-to-end) passing and the changes are covered with tests
  • Documentation is not required

@max-nextcloud max-nextcloud force-pushed the enh/vitest branch 4 times, most recently from 69b86e5 to f3176b2 Compare October 14, 2024 07:30
Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
Typescript provides type checks for the arguments.
No need for an object with named args.

Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
vite.config.ts also defines the vitest config.

Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
* need to inline `@nextcloud/dialogs` so `@nextcloud/vue`
  is always inlined.
* specify setup file in vite config.
* add types for window.t and window.n
* get `t` from window.t in Menu/keys.js

Signed-off-by: Max <max@nextcloud.com>
Signed-off-by: Max <max@nextcloud.com>
* Port changed to 3000.
* Stub axios request as `vitest` will catch failing requests
  even if the test itself passes.

Signed-off-by: Max <max@nextcloud.com>
Also move mocks from setup.mjs into testHelpers.

Signed-off-by: Max <max@nextcloud.com>
`createCustomEditor.ts` test script imports `Paragraph`
and `tsc` complains without type definitions.

Signed-off-by: Max <max@nextcloud.com>
@max-nextcloud max-nextcloud marked this pull request as ready for review October 14, 2024 07:34
@max-nextcloud max-nextcloud requested review from juliushaertl and removed request for mejo- October 14, 2024 07:35
Signed-off-by: Max <max@nextcloud.com>
@max-nextcloud max-nextcloud self-assigned this Oct 14, 2024
@max-nextcloud max-nextcloud added 3. to review dependencies Pull requests that update a dependency file labels Oct 14, 2024
@max-nextcloud max-nextcloud added this to the Nextcloud 31 milestone Oct 14, 2024
Signed-off-by: Max <max@nextcloud.com>
@juliushaertl
Copy link
Member

Not sure why cypress tests didn't run, pushed again to double check

@max-nextcloud
Copy link
Collaborator Author

https://github.com/nextcloud/text/actions/runs/11323139310/job/31496900473 I think cypress actually ran. Maybe just been stuck on the queue?

@max-nextcloud max-nextcloud merged commit 7587d1a into main Oct 14, 2024
61 checks passed
@max-nextcloud max-nextcloud deleted the enh/vitest branch October 14, 2024 13:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
3. to review dependencies Pull requests that update a dependency file
Projects
Status: ☑️ Done
Development

Successfully merging this pull request may close these issues.

2 participants