Skip to content

Commit

Permalink
Rename variables
Browse files Browse the repository at this point in the history
  • Loading branch information
ehmicky committed Sep 5, 2021
1 parent eb57d09 commit 08d0d44
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
6 changes: 3 additions & 3 deletions src/report/reporters/boxplot/box.js
Original file line number Diff line number Diff line change
Expand Up @@ -32,12 +32,12 @@ const getLeftSpace = function (min, minBlockWidth, mini) {
}

const getMinLine = function (min, q1) {
const leftLine = fillCharacter(LINE_CHARACTER, min, q1)
const leftLine = fillCharacter(HORIZONTAL_LINE, min, q1)
return leftLine === '' ? leftLine : `${MIN_CHARACTER}${leftLine.slice(1)}`
}

const getMaxLine = function (q3, max) {
const rightLine = fillCharacter(LINE_CHARACTER, q3, max)
const rightLine = fillCharacter(HORIZONTAL_LINE, q3, max)
return rightLine === ''
? rightLine
: `${rightLine.slice(0, -1)}${MAX_CHARACTER}`
Expand All @@ -53,7 +53,7 @@ const repeatCharacter = function (character, width) {

// Works on most terminals
const MIN_CHARACTER = '\u251C'
const LINE_CHARACTER = '\u2500'
const HORIZONTAL_LINE = '\u2500'
const BOX_CHARACTER = '\u2591'
const MEDIAN_CHARACTER = '\u2588'
const MAX_CHARACTER = '\u2524'
Expand Down
4 changes: 2 additions & 2 deletions src/report/utils/line.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,8 @@ import { separatorColor } from './colors.js'
// Separator between different reporters and/or preview elements
export const getLineSeparator = function () {
const paddedScreenWidth = getPaddedScreenWidth()
return `${separatorColor(LINE_CHAR.repeat(paddedScreenWidth))}\n`
return `${separatorColor(HORIZONTAL_LINE.repeat(paddedScreenWidth))}\n`
}

// Works with all terminals
const LINE_CHAR = '\u2500'
const HORIZONTAL_LINE = '\u2500'

0 comments on commit 08d0d44

Please sign in to comment.