At 6.44, I don’t think there is a diff between:
URLSession.shared.dataTask(with: url) { data, response, error in
XCTAssertNotNil(data)
expection.fulfill()
}.resume()
and
```swift
URLSession.shared.dataTask(with: url) { data, response, error in
expection.fulfill()
XCTAssertNotNil(data)
}.resume()
data, response are nil and error is non-nil. Would be great if there can be a bit more details here. Thanks.
See the previous version of the course for a demonstration of how the results are nondeterministic. When I recorded that, the tests happened to pass.
Unfortunately, there’s no way to demonstrate this predictably. Just fulfill
at the end, like I went over, and you won’t ever see related bugs.