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

test: colorTextBySeverity tests #2121

Merged
merged 1 commit into from
Aug 11, 2021
Merged

Conversation

ofir-eldar1
Copy link
Contributor

What does this PR do?

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

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.

3 participants