Facilitate the control of the course of time in the tests to avoid their fragility
Nobody has claimed this yet.
- Dominant language
- C#
- Stars
- 11.2k
- Forks
- 1k
- PR merge metrics
- No merged PRs in 30d
Description
Microsoft created in .NET 8 a package with the TimeProvider class.
This class is very useful to be able to mock it and use it together with Task.Delay since it adds an overload with TimeProvider.
Besides, they provide another package to be able to control the course of time in tests.
It would be nice if UniTask had a similar functionality because otherwise, it is difficult to make tests that are not fragile.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start by reviewing UniTask's delay functionality and its existing tests, then compare their needs with Microsoft's TimeProvider and test package described in the issue. Done means providing a documented way to control time in tests so asynchronous timing tests are no longer fragile.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- testing-qa
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Quiet
- Clarity
- Needs clarification
- Newbie friendliness
- 35/100