Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

feat(processes): waitForPort helper #452

Merged
merged 8 commits into from
Jun 24, 2024
Merged

feat(processes): waitForPort helper #452

merged 8 commits into from
Jun 24, 2024

Conversation

wellwelwel
Copy link
Owner

@wellwelwel wellwelwel commented Jun 24, 2024

Waiting for a port

import { waitForPort } from 'poku';

await waitForPort(3000, {
  delay: 0,
  interval: 100,
  timeout: 60000,
  host: 'localhost',
});

Waiting for multiple ports

import { waitForPort } from 'poku';

await Promise.all([
  waitForPort(3000),
  waitForPort(4000),
  waitForPort(5000),
]);

Copy link

codecov bot commented Jun 24, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 99.35%. Comparing base (9110430) to head (3a2ad29).

Current head 3a2ad29 differs from pull request most recent head 73354b9

Please upload reports for the commit 73354b9 to get more accurate results.

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #452      +/-   ##
==========================================
+ Coverage   99.33%   99.35%   +0.01%     
==========================================
  Files          32       33       +1     
  Lines        3155     3243      +88     
  Branches      530      509      -21     
==========================================
+ Hits         3134     3222      +88     
  Misses         20       20              
  Partials        1        1              
Flag Coverage Δ
linux-parallel 99.16% <100.00%> (+0.02%) ⬆️
linux-parallel-options 99.29% <100.00%> (+0.01%) ⬆️
linux-sequential ?
linux-sequential-options ?
osx-parallel 94.85% <100.00%> (+0.14%) ⬆️
osx-parallel-options 94.97% <100.00%> (?)
osx-sequential 93.74% <100.00%> (+0.17%) ⬆️
osx-sequential-options 93.83% <100.00%> (+0.17%) ⬆️
windows-parallel 94.29% <100.00%> (+0.15%) ⬆️
windows-parallel-options 94.41% <100.00%> (+0.15%) ⬆️
windows-sequential ?
windows-sequential-options ?

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

@wellwelwel wellwelwel marked this pull request as ready for review June 24, 2024 08:58
@wellwelwel wellwelwel merged commit 01751f8 into main Jun 24, 2024
37 checks passed
@wellwelwel wellwelwel deleted the wait-for branch June 24, 2024 09:36
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant