Cysharp / Cysharp/UniTask

Facilitate the control of the course of time in the tests to avoid their fragility

Open
#657 4 comments 0 reactions 0 assignees View on GitHub

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

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. 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

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.