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 globals #27102

Merged
merged 10 commits into from Sep 27, 2023
Merged

Use vitest globals #27102

merged 10 commits into from Sep 27, 2023

Conversation

silverwind
Copy link
Member

Enable globals in vitest, reducing the noise in test files.

@GiteaBot GiteaBot added the lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. label Sep 16, 2023
@pull-request-size pull-request-size bot added the size/S Denotes a PR that changes 10-29 lines, ignoring generated files. label Sep 16, 2023
@silverwind silverwind added skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. type/testing labels Sep 16, 2023
@github-actions github-actions bot added topic/ui Change the appearance of the Gitea UI topic/code-linting and removed type/testing labels Sep 16, 2023
@silverwind
Copy link
Member Author

silverwind commented Sep 16, 2023

I also added the recommended tsconfig.json, which may be parsed by editor plugins for autocompletion etc. Even if we are not using Typescript yet, this file is still useful and I noticed some eslint plugins can also make use of it for Javascript projects.

Edit: Actually, no, I think it's a bad idea to override types, reverted that.

@silverwind silverwind changed the title Use vitest globals Use vitest globals, add tsconfig.json Sep 16, 2023
@silverwind silverwind changed the title Use vitest globals, add tsconfig.json Use vitest globals Sep 16, 2023
@GiteaBot GiteaBot added lgtm/need 1 This PR needs approval from one additional maintainer to be merged. and removed lgtm/need 2 This PR needs two approvals by maintainers to be considered for merging. labels Sep 16, 2023
* origin/main:
  Fix dropdown icon position (go-gitea#27175)
  Fix repo sub menu (go-gitea#27169)
  Fix review request number and add more tests (go-gitea#27104)
  Fix the variable regexp pattern on web page (go-gitea#27161)
  Fix organization field being null in POST /orgs/{orgid}/teams (go-gitea#27150)
  Add index to `issue_user.issue_id` (go-gitea#27154)
  [skip ci] Updated translations via Crowdin
  Start development on Gitea 1.22 (go-gitea#27155)
  Fix successful return value for `SyncAndGetUserSpecificDiff` (go-gitea#27152)
  Improve actions docs related to `pull_request` event (go-gitea#27126)
  Remove outdated paragraphs when comparing Gitea Actions to GitHub Actions (go-gitea#27119)
  Fix: treat tab "overview" as "repositories" in user profiles without readme (go-gitea#27124)
  Fix incorrect test code for error handling (go-gitea#27139)
  Increase auth provider icon size on login page (go-gitea#27122)
  fix pagination for followers and following (go-gitea#27127)
  services/wiki: Close() after error handling (go-gitea#27129)
  Use fetch helpers instead of fetch (go-gitea#27026)
  Change green buttons to primary color (go-gitea#27099)
  Fix wrong xorm get usage on migration (go-gitea#27111)
@GiteaBot GiteaBot added lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. and removed lgtm/need 1 This PR needs approval from one additional maintainer to be merged. labels Sep 27, 2023
@lunny lunny added the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Sep 27, 2023
@lunny lunny enabled auto-merge (squash) September 27, 2023 04:07
@lunny lunny merged commit ee27b94 into go-gitea:main Sep 27, 2023
26 checks passed
@GiteaBot GiteaBot added this to the 1.22.0 milestone Sep 27, 2023
@GiteaBot GiteaBot removed the reviewed/wait-merge This pull request is part of the merge queue. It will be merged soon. label Sep 27, 2023
@silverwind silverwind added the backport/v1.21 This PR should be backported to Gitea 1.21 label Sep 27, 2023
@silverwind
Copy link
Member Author

Can backport if automatic, else skip :)

@silverwind silverwind deleted the vitest-global branch September 27, 2023 08:36
GiteaBot pushed a commit to GiteaBot/gitea that referenced this pull request Sep 27, 2023
Enable [globals](https://vitest.dev/config/#globals) in vitest, reducing
the noise in test files.
@GiteaBot GiteaBot added the backport/done All backports for this PR have been created label Sep 27, 2023
silverwind added a commit that referenced this pull request Sep 27, 2023
Backport #27102 by @silverwind

Enable [globals](https://vitest.dev/config/#globals) in vitest, reducing
the noise in test files.

Co-authored-by: silverwind <me@silverwind.io>
zjjhot added a commit to zjjhot/gitea that referenced this pull request Sep 28, 2023
* giteaoffical/main: (22 commits)
  Fix review UI (go-gitea#27322)
  Improve issue history dialog and make poster can delete their own history (go-gitea#27323)
  Improve branch list UI (go-gitea#27319)
  doctor: delete action entries without existing user (go-gitea#27292)
  fix orphan check for deleted branch (go-gitea#27310)
  make writing main test easier (go-gitea#27270)
  [skip ci] Updated translations via Crowdin
  Fix protected branch icon location (go-gitea#26576)
  move the `gitea admin` subcommands into separate files (go-gitea#27307)
  Fix chinese translation (go-gitea#27296)
  bump bleve (go-gitea#27300)
  Redefine the meaning of column is_active to make Actions Registration Token generation easier (go-gitea#27143)
  Use vitest globals (go-gitea#27102)
  Fix divider in subscription page (go-gitea#27298)
  Fix yaml test (go-gitea#27297)
  Enable production source maps for index.js, fix CSS sourcemaps (go-gitea#27291)
  Fix some animation bugs (go-gitea#27287)
  Add missed return to actions view fetch (go-gitea#27289)
  Fix more yaml lint errors (go-gitea#27284)
  Fix incorrect change from go-gitea#27231 (go-gitea#27275)
  ...
@go-gitea go-gitea locked as resolved and limited conversation to collaborators Dec 26, 2023
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
backport/done All backports for this PR have been created backport/v1.21 This PR should be backported to Gitea 1.21 lgtm/done This PR has enough approvals to get merged. There are no important open reservations anymore. size/S Denotes a PR that changes 10-29 lines, ignoring generated files. skip-changelog This PR is irrelevant for the (next) changelog, for example bug fixes for unreleased features. topic/code-linting topic/ui Change the appearance of the Gitea UI type/testing
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants