diff --git a/.gitignore b/.gitignore index 4178c3e..140bca5 100644 --- a/.gitignore +++ b/.gitignore @@ -13,6 +13,8 @@ Packages/ .build/ *.resolved +.swiftpm/configuration/registries.json +.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata # Bazel diff --git a/Tests/PromisesTests/Promise+ThenTests.swift b/Tests/PromisesTests/Promise+ThenTests.swift index 35eabde..65fcdb9 100644 --- a/Tests/PromisesTests/Promise+ThenTests.swift +++ b/Tests/PromisesTests/Promise+ThenTests.swift @@ -59,20 +59,20 @@ class PromiseThenTests: XCTestCase { XCTAssertNil(postFinalPromise.error) } - func testPromiseWhenNilBridgesToNSNullInThenChain() { + func testPromiseWhenNilBridgesToNilInThenChain() { // Act. let promise = Promise { fulfill, _ in fulfill(nil) }.catch { _ in XCTFail() }.then { value in - XCTAssert(value is NSNull) + XCTAssertNil(value) } // Assert. XCTAssert(waitForPromises(timeout: 10)) XCTAssertTrue(promise.isFulfilled) - XCTAssert(promise.value is NSNull) + XCTAssertNil(promise.value) XCTAssertNil(promise.error) }