Skip to content
This repository was archived by the owner on Feb 22, 2023. It is now read-only.

Commit 82365e5

Browse files
committed
Fullfill only when initialized
1 parent 4e51c4c commit 82365e5

File tree

1 file changed

+1
-3
lines changed

1 file changed

+1
-3
lines changed

packages/video_player/video_player_avfoundation/example/ios/RunnerTests/VideoPlayerTests.m

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -189,7 +189,6 @@ - (void)testTransformFix {
189189
XCTAssertNotNil(player);
190190

191191
XCTestExpectation *initializedExpectation = [self expectationWithDescription:@"initialized"];
192-
initializedExpectation.assertForOverFulfill = false;
193192
__block NSDictionary<NSString *, id> *initializationEvent;
194193
[player onListenWithArguments:nil
195194
eventSink:^(id event) {
@@ -200,13 +199,12 @@ - (void)testTransformFix {
200199
if ([eventDictionary[@"event"] isEqualToString:@"initialized"]) {
201200
initializationEvent = eventDictionary;
202201
XCTAssertEqual(eventDictionary.count, 4);
202+
[initializedExpectation fulfill];
203203
}
204204
} else if ([event isKindOfClass:[FlutterError class]]) {
205205
FlutterError *error = event;
206206
XCTFail(@"%@: %@ (%@)", error.code, error.message, error.details);
207207
}
208-
209-
[initializedExpectation fulfill];
210208
}];
211209
[self waitForExpectationsWithTimeout:30.0 handler:nil];
212210

0 commit comments

Comments
 (0)