Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 2 additions & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,8 @@
Packages/
.build/
*.resolved
.swiftpm/configuration/registries.json
.swiftpm/xcode/package.xcworkspace/contents.xcworkspacedata

# Bazel

Expand Down
6 changes: 3 additions & 3 deletions Tests/PromisesTests/Promise+ThenTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -59,20 +59,20 @@ class PromiseThenTests: XCTestCase {
XCTAssertNil(postFinalPromise.error)
}

func testPromiseWhenNilBridgesToNSNullInThenChain() {
func testPromiseWhenNilBridgesToNilInThenChain() {
// Act.
let promise = Promise<Any?> { 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)
}

Expand Down