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 Test212: XCTestCase {
func test() {
describe("2.1.2.1: When fulfilled, a promise: must not transition to any other state.") {
testFulfilled { promise, expectation, _ in
promise.test(onFulfilled: expectation.fulfill, onRejected: { XCTFail() })
}
specify("trying to fulfill then immediately reject") { d, expectation in
d.promise.test(onFulfilled: expectation.fulfill, onRejected: { XCTFail() })
d.fulfill()
d.reject(Error.dummy)
}
specify("trying to fulfill then reject, delayed") { d, expectation in
d.promise.test(onFulfilled: expectation.fulfill, onRejected: { XCTFail() })
after(ticks: 1) {
d.fulfill()
d.reject(Error.dummy)
}
}
}
}
}