Skip to content

Commit 55f6c80

Browse files
authored
Merge pull request #41 from clue-labs/unhandled-rejections
Update test suite to avoid unhandled promise rejections
2 parents de886e8 + 68da1f6 commit 55f6c80

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

tests/QueueAllTest.php

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -118,6 +118,8 @@ public function testQueuedOperationsWillStartAndCancelOneIfOneOperationRejects()
118118
return $promise;
119119
});
120120

121+
$promise->then(null, $this->expectCallableOnce()); // avoid reporting unhandled rejection
122+
121123
$first->reject(new \RuntimeException());
122124

123125
$this->assertEquals(3, $started);

0 commit comments

Comments
 (0)