Skip to content

Commit

Permalink
Test for issue #50
Browse files Browse the repository at this point in the history
  • Loading branch information
puggan committed Dec 7, 2023
1 parent 6db2053 commit 90a6193
Showing 1 changed file with 14 additions and 0 deletions.
14 changes: 14 additions & 0 deletions tests/ForkTest.php
Original file line number Diff line number Diff line change
Expand Up @@ -138,3 +138,17 @@ function () {
fn () => 1
);
});

test('allow 2nd process to be done before the 1st')
->expect(
fn () => Fork::new()->run(
static function () {
usleep(200_000);
return 2;
},
static function () {
usleep(100_000);
return 1;
},
)
)->toEqual([2,1]);

0 comments on commit 90a6193

Please sign in to comment.