File tree Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Expand file tree Collapse file tree 1 file changed +10
-5
lines changed Original file line number Diff line number Diff line change @@ -19,7 +19,10 @@ class DataLoaderAbuseTests: XCTestCase {
19
19
20
20
let value = try identityLoader. load ( key: 1 , on: eventLoopGroup)
21
21
22
- XCTAssertThrowsError ( try value. wait ( ) , " Did not return value for key: 1 " )
22
+ XCTAssertThrowsError (
23
+ try value. wait ( ) ,
24
+ " Did not return value for key: 1 "
25
+ )
23
26
}
24
27
25
28
func testBatchFuntionMustPromiseAnArrayOfCorrectLength( ) throws {
@@ -53,7 +56,9 @@ class DataLoaderAbuseTests: XCTestCase {
53
56
if key == 1 {
54
57
results. append ( DataLoaderFutureValue . success ( key) )
55
58
} else {
56
- results. append ( DataLoaderFutureValue . failure ( " Test error " ) )
59
+ results. append (
60
+ DataLoaderFutureValue . failure ( DataLoaderError . typeError ( " Test error " ) )
61
+ )
57
62
}
58
63
}
59
64
@@ -83,7 +88,9 @@ class DataLoaderAbuseTests: XCTestCase {
83
88
if key == 1 {
84
89
results. append ( DataLoaderFutureValue . success ( key) )
85
90
} else {
86
- results. append ( DataLoaderFutureValue . failure ( " Test error " ) )
91
+ results. append (
92
+ DataLoaderFutureValue . failure ( DataLoaderError . typeError ( " Test error " ) )
93
+ )
87
94
}
88
95
}
89
96
@@ -98,5 +105,3 @@ class DataLoaderAbuseTests: XCTestCase {
98
105
XCTAssertTrue ( try value1. wait ( ) == 1 )
99
106
}
100
107
}
101
-
102
- extension String : Error { }
You can’t perform that action at this time.
0 commit comments