Add PromiseKit dependency

- Added PromiseKit dependency
This commit is contained in:
2018-11-15 22:08:00 -04:00
parent 2689d86c18
commit be7b6b5881
541 changed files with 46282 additions and 0 deletions

View 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()
}
}
}
}