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

Remove Task's type: 'custom' #6865

Open
4 tasks done
sheremet-va opened this issue Nov 5, 2024 · 3 comments
Open
4 tasks done

Remove Task's type: 'custom' #6865

sheremet-va opened this issue Nov 5, 2024 · 3 comments
Labels
p1-chore Doesn't change code behavior (priority)

Comments

@sheremet-va
Copy link
Member

sheremet-va commented Nov 5, 2024

Clear and concise description of the problem

The custom type is identical to the test type; the only difference is that it's initiated by calling getCurrentSuite().task(). Users of the API can attach their own custom properties to differentiate between built-in tests and custom tests.

Suggested solution

  • Deprecate the Custom type now in 2.2
  • Always set type to 'test' in 2.3
  • Remove the Custom in Vitest 3

Alternative

No response

Additional context

No response

Validations

@sheremet-va sheremet-va added the p1-chore Doesn't change code behavior (priority) label Nov 5, 2024
@sheremet-va
Copy link
Member Author

We might also be able to remove the type = 'custom' before Vitest 3 🤔 (By replacing it with type = 'test') I am not sure how breaking it is 🤔

@hi-ogawa
Copy link
Contributor

hi-ogawa commented Nov 6, 2024

22 matches on Github and most of them are Vitest repo or forks https://github.com/search?q=%22getCurrentSuite%28%29.task%22&type=code It looks fine to change and no one would notice 😃

@sheremet-va
Copy link
Member Author

sheremet-va commented Nov 6, 2024

True, true 🤔 Maybe it's fine to replace custom with test right away 🤔 It's still considered an experimental API.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
p1-chore Doesn't change code behavior (priority)
Projects
None yet
Development

No branches or pull requests

2 participants