-
Notifications
You must be signed in to change notification settings - Fork 731
Closed
Description
Description
When formatting a TimeSpan we currently combine the second and millisecond parts, such that TimeSpan.FromSeconds(1.5) is formatted as 1.500s.
When the time span is less than 1 second we could improve formatting by outputting the value in milliseconds instead.
Complete minimal example reproducing the issue
Func<Task> act = () => Task.Delay(50.Milliseconds());
await act.Should().CompleteWithinAsync(1.Milliseconds());Expected behavior:
Expected task to complete within 1ms.
Actual behavior:
Expected task to complete within 0.001s.
dennisdoomen