Add PromiseKit dependency
- Added PromiseKit dependency
This commit is contained in:
26
Carthage/Checkouts/PromiseKit/Tests/A+/2.3.4.swift
vendored
Normal file
26
Carthage/Checkouts/PromiseKit/Tests/A+/2.3.4.swift
vendored
Normal file
@@ -0,0 +1,26 @@
|
||||
import PromiseKit
|
||||
import XCTest
|
||||
|
||||
|
||||
class Test234: XCTestCase {
|
||||
func test() {
|
||||
describe("2.3.4: If `x` is not an object or function, fulfill `promise` with `x`") {
|
||||
testFulfilled { promise, exception, _ in
|
||||
promise.map { value -> UInt32 in
|
||||
return 1
|
||||
}.done { value in
|
||||
XCTAssertEqual(value, 1)
|
||||
exception.fulfill()
|
||||
}.silenceWarning()
|
||||
}
|
||||
testRejected { promise, expectation, _ in
|
||||
promise.recover { _ -> Promise<UInt32> in
|
||||
return .value(UInt32(1))
|
||||
}.done { value in
|
||||
XCTAssertEqual(value, 1)
|
||||
expectation.fulfill()
|
||||
}.silenceWarning()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
Reference in New Issue
Block a user