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(process): have proper error message when process is failing #3

Closed
tony-go opened this issue Apr 7, 2022 · 0 comments
Closed
Labels
enhancement New feature or request good first issue Good for newcomers

Comments

@tony-go
Copy link
Owner

tony-go commented Apr 7, 2022

Current behavior

When a user passes a wrong command, it will fail silently.

const scenario = clix('command that fail')
    .expect('poof').
    
const { ok } = await scenario.run();

// the run doesn't throw 😱
// ok === false

Expected behavior

const scenario = clix('command-foo')
    .expect('poof').
 
try {
    const { ok } = await scenario.run();
} catch (e) {
    // .run() should we should catch an error
    // e === new Error('Run command-foo failed: <error>');
}
@tony-go tony-go added enhancement New feature or request good first issue Good for newcomers labels Apr 7, 2022
@tony-go tony-go mentioned this issue Apr 26, 2022
@tony-go tony-go closed this as completed Apr 26, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request good first issue Good for newcomers
Projects
None yet
Development

No branches or pull requests

1 participant