diff --git a/Tests/CoreObjC/AnyPromiseTests.m b/Tests/CoreObjC/AnyPromiseTests.m index 5c3ce92..9c93e51 100644 --- a/Tests/CoreObjC/AnyPromiseTests.m +++ b/Tests/CoreObjC/AnyPromiseTests.m @@ -757,28 +757,20 @@ static inline AnyPromise *fulfillLater() { [self waitForExpectationsWithTimeout:1 handler:nil]; } -- (void)test_61_wait_for_value { - id ex1 = [self expectationWithDescription:@""]; - +- (void)test_61_wait_for_value { id o = [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { resolve(@1); }].wait; XCTAssertEqualObjects(o, @1); - [ex1 fulfill]; - [self waitForExpectationsWithTimeout:1 handler:nil]; } - (void)test_62_wait_for_error { - id ex1 = [self expectationWithDescription:@""]; - NSError* err = [AnyPromise promiseWithResolverBlock:^(PMKResolver resolve) { resolve([NSError errorWithDomain:@"a" code:123 userInfo:nil]); }].wait; XCTAssertEqual(err.code, 123); - [ex1 fulfill]; - [self waitForExpectationsWithTimeout:1 handler:nil]; } - (void)test_properties {