File tree Expand file tree Collapse file tree 2 files changed +18
-14
lines changed Expand file tree Collapse file tree 2 files changed +18
-14
lines changed Original file line number Diff line number Diff line change @@ -126,15 +126,17 @@ final class BidirectionalPaginationTests: XCTestCase, CacheDependentTesting {
126
126
127
127
try XCTAssertSuccessResult ( result) { output in
128
128
// Assert first page is unchanged
129
- if
130
- let oldResults = try ? results. first? . get ( ) . initialPage,
131
- let newResults = try ? results. last? . get ( ) . initialPage,
132
- oldResults != newResults
129
+ let oldResults = try ? results. first? . get ( ) . initialPage
130
+ let newResults = try ? results. last? . get ( ) . initialPage
131
+ if oldResults != newResults
133
132
{
134
- print ( " test_fetchMultiplePages_async - debugging output" )
135
- print ( " Old: \( oldResults . asJSONDictionary ( ) ) " )
136
- print ( " New: \( newResults . asJSONDictionary ( ) ) " )
133
+ print ( " test_fetchMultiplePages_mutateHero - debugging output - not equal " )
134
+ } else {
135
+ print ( " test_fetchMultiplePages_mutateHero - debugging output - equal " )
137
136
}
137
+ print ( " Old: \( oldResults? . asJSONDictionary ( ) ) " )
138
+ print ( " New: \( newResults? . asJSONDictionary ( ) ) " )
139
+
138
140
XCTAssertEqual ( try ? results. first? . get ( ) . initialPage, try ? results. last? . get ( ) . initialPage)
139
141
140
142
XCTAssertFalse ( output. nextPages. isEmpty)
Original file line number Diff line number Diff line change @@ -204,15 +204,17 @@ final class ForwardPaginationTests: XCTestCase, CacheDependentTesting {
204
204
let newResult = try await XCTUnwrapping ( await pager. currentValue)
205
205
try XCTAssertSuccessResult ( newResult) { output in
206
206
// Assert first page is unchanged
207
- if
208
- let oldResults = try ? result. get ( ) . initialPage,
209
- let newResults = try ? newResult. get ( ) . initialPage,
210
- oldResults != newResults
207
+ let oldResults = try ? result. get ( ) . initialPage
208
+ let newResults = try ? newResult. get ( ) . initialPage
209
+ if oldResults != newResults
211
210
{
212
- print ( " test_fetchMultiplePages_mutateHero - debugging output " )
213
- print ( " Old: \( oldResults . asJSONDictionary ( ) ) " )
214
- print ( " New: \( newResults . asJSONDictionary ( ) ) " )
211
+ print ( " test_fetchMultiplePages_mutateHero - debugging output - not equal " )
212
+ } else {
213
+ print ( " test_fetchMultiplePages_mutateHero - debugging output - equal " )
215
214
}
215
+ print ( " Old: \( oldResults? . asJSONDictionary ( ) ) " )
216
+ print ( " New: \( newResults? . asJSONDictionary ( ) ) " )
217
+
216
218
XCTAssertEqual ( try ? result. get ( ) . initialPage, try ? newResult. get ( ) . initialPage)
217
219
XCTAssertFalse ( output. nextPages. isEmpty)
218
220
XCTAssertEqual ( output. nextPages. count, 1 )
You can’t perform that action at this time.
0 commit comments