Skip to content

Conversation

@ofir-eldar1
Copy link
Contributor

What does this PR do?

Created tests for colorTextBySeverity (src/lib/snyk-test/common.ts/colorTextBySeverity).

@ofir-eldar1 ofir-eldar1 requested review from a team as code owners July 28, 2021 12:00
Copy link
Contributor

@Avishagp Avishagp left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

lgtm! 👍

@github-actions
Copy link
Contributor

Messages
📖

This PR will not trigger a new version. It doesn't include any commit message with feat or fix.

Generated by 🚫 dangerJS against 8b2dc42

it('Returns a high severity colored text', () => {
const severity = SEVERITY.HIGH;
expect(colorTextBySeverity(severity, 'Pls help me')).toEqual(
color.severity[severity]('Pls help me'),
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

You could also detect if color is being applied by checking for the ANSII escape code but not a requirement here

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 this pull request may close these issues.

4 participants