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

FR: Wait for string/regex to show up in server output #316

Open
anishkny opened this issue Sep 29, 2021 · 0 comments
Open

FR: Wait for string/regex to show up in server output #316

anishkny opened this issue Sep 29, 2021 · 0 comments

Comments

@anishkny
Copy link

Feature Request

Allow waiting on some string/regex to appear in the server output text (stdout/stderr) instead of port/URL to be used.

Some servers may not allow configuring or determining which port they use, or may not even use ports. Seems like the only way to determine if such a server has started is via some text appearing on stdout/stderr.

For example when using stripe-cli to listen to webhooks locally for testing, we only get the output:

⣟ Getting ready... > Ready! Your webhook signing secret is whsec_xxxxxxxxxxxx (^C to quit)

It would be nice to have something like:

{
    "scripts": {
        "start": "stripe listen ...",
        "test": "./run-tests.sh",

        // Wait for regex /Ready!/ to appear in output of "npm start":
        "ci": "start-server-and-test start /Ready!/ test" 
    }
}

See related stripe/stripe-cli#756.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant