Skip to content

Commit 19a2dcf

Browse files
authored
Merge pull request #6 from SwiftRex/verboseAssert
Use case tests: tell the user which unexpeted actions have been received
2 parents 7049d80 + cc6bf54 commit 19a2dcf

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

Sources/TestingExtensions/UseCaseTests.swift

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -266,7 +266,10 @@ extension XCTestCase {
266266
switch outerStep {
267267
case let .send(action, file, line, stateChange)://action, file, line, stateChange):
268268
if !middlewareResponses.isEmpty {
269-
XCTFail("Action sent before handling \(middlewareResponses.count) pending effect(s)", file: file, line: line)
269+
XCTFail("""
270+
Action sent before handling \(middlewareResponses.count) pending effect(s):
271+
\(middlewareResponses.map { "\($0)" }.joined(separator: "\n"))
272+
""", file: file, line: line)
270273
}
271274

272275
var afterReducer: AfterReducer = .doNothing()

0 commit comments

Comments
 (0)