Skip to content

Commit

Permalink
Add diffLimit sign
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Jan 9, 2022
1 parent 3322aed commit 0681ea7
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/report/normalize/stats/sign.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,12 +9,13 @@ const addNeverSign = function (pretty) {
: `${PLUS_MINUS_SIGN}${pretty}`
}

const addDiffSign = function (pretty, { diffPrecise }) {
const addDiffSign = function (pretty, { diffPrecise, diffLimit }) {
const impreciseSign = diffPrecise ? '' : IMPRECISE_SIGN
const limitSign = diffLimit === undefined ? '' : ' \u203C'

return hasMinusSign(pretty)
? `${impreciseSign}${pretty}`
: `${impreciseSign}${PLUS_SIGN}${pretty}`
? `${impreciseSign}${pretty}${limitSign}`
: `${impreciseSign}${PLUS_SIGN}${pretty}${limitSign}`
}

const hasMinusSign = function (pretty) {
Expand Down

0 comments on commit 0681ea7

Please sign in to comment.