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

Invalid 'say' value does not show validation error #20

Closed
SketchingDev opened this issue Sep 14, 2022 · 2 comments · Fixed by #21
Closed

Invalid 'say' value does not show validation error #20

SketchingDev opened this issue Sep 14, 2022 · 2 comments · Fixed by #21
Assignees

Comments

@SketchingDev
Copy link
Collaborator

When running tests with a 'say' command with a number the validation message is not logged.

config:
  region: x.pure.cloud
scenarios:
  "test name":
    - say: 1
yarn run v1.22.18
$ web-messaging-tester ./tests/example.yaml --deployment-id x
error Command failed with exit code 1.
info Visit https://yarnpkg.com/en/docs/cli/run for documentation about this command.

Process finished with exit code 1
@SketchingDev SketchingDev self-assigned this Sep 14, 2022
@SketchingDev
Copy link
Collaborator Author

Noticed that the validation error is written to the terminal, then immediately overwritten with error Command failed with exit code 1.

Perhaps related to yarnpkg/yarn#5005

@SketchingDev
Copy link
Collaborator Author

When newline is encoded with colour strings then problem of message being overwritten occurs:

chalk.bold.red(`Failed to validate Test Script\n`)
// Output = [31mFailed to validate Test Script�[39m\n�[31m�[39m

When newline encoded outside of colour strings then message is not overwritten:

chalk.bold.red(`Failed to validate Test Script`) + '\n'
// Output = [31mFailed to validate Test Script�[39m\n

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

Successfully merging a pull request may close this issue.

1 participant