Skip to content

Conversation

@scottmarchant
Copy link
Collaborator

@scottmarchant scottmarchant commented Dec 2, 2025

Summary

Adds shared test utilities to simplify async runtime assertions. Umbrella: #2.

Details

  • d635942 feat: Add testing utilities that make a number of nio-related tests much easier to run.

Usage Examples

  • Capture thrown errors while keeping a default value:
let value: Int = try assertNoThrowWithValue(try maybeThrowing(), defaultValue: 0)
  • Assert a condition becomes true within a deadline:
assert(flag.load(ordering: .relaxed), within: .milliseconds(50))

Tests exercising these helpers: #6 and #10.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants