Skip to content

Commit

Permalink
fix: solve issue that wait mock function modify callback permanently
Browse files Browse the repository at this point in the history
  • Loading branch information
0xWOF committed Jan 18, 2024
1 parent fd9d6a0 commit c3b9d1f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion Source/TestWait/TestMock/WaitMockFunction.swift
Original file line number Diff line number Diff line change
Expand Up @@ -29,9 +29,10 @@ public struct WaitMockFunction {
if until(argument, result) {
callArgument = argument
callResult = result
callback(argument, result)
semaphore.signal()
mock.callback = callback
}
callback(argument, result)
}
try block()

Expand Down

0 comments on commit c3b9d1f

Please sign in to comment.