Skip to content

Conversation

@gkjung
Copy link
Contributor

@gkjung gkjung commented Jun 15, 2022

Line breaks now occur when expected.

However, adding this code has cause a test error: Coverage for branches (79.96%) does not meet global threshold (80%)
Should constructHtml (and contructJson) have additional tests for when verboseViolations is true?

@jfeingold35
Copy link
Contributor

Line breaks now occur when expected.

However, adding this code has cause a test error: Coverage for branches (79.96%) does not meet global threshold (80%) Should constructHtml (and contructJson) have additional tests for when verboseViolations is true?

Yeah, that's probably necessary to get the coverage up. You must have barely dropped it below acceptable minimums.

category: v.category,
url: v.url,
message: v.message,
message: verboseViolations && result.engine === 'retire-js' ? v.message.replace(/\n/g, '<br>') : v.message, // <br> used for line breaks in html
Copy link
Contributor

Choose a reason for hiding this comment

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

This is unnecessary. RetireJS only returns pathless violations.

category: v.category,
url: v.url,
message: v.message,
message: verboseViolations && result.engine === 'retire-js' ? v.message.replace(/\n/g, '<br>') : v.message, // <br> used for line breaks in html
Copy link
Contributor

Choose a reason for hiding this comment

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

As in the other PR, import ENGINE from Constants.ts and use ENGINE.RETIRE_JS.

@gkjung gkjung merged commit 0f1c6e7 into dev-3 Jun 16, 2022
@jfeingold35 jfeingold35 deleted the d/W-11267130 branch June 23, 2022 16:13
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants