UNPKG

681 BJavaScriptView Raw
1process.env.NODE_ENV = 'test'
2
3const MAIN_LINE = '⏤'
4const MAIN_ICON = '🚧'
5const DESCRIBE_ICON = '✏️'
6const TEST_ICON = '📝'
7
8module.exports = {
9 icons: {
10 MAIN_LINE,
11 MAIN_ICON,
12 DESCRIBE_ICON,
13 TEST_ICON
14 },
15 classLabel: (str, icon = MAIN_ICON) => {
16 let main = ' ' + str + ' ' + MAIN_LINE.repeat(terminal.width - str.length - 10)
17 return `\n${icon} ` + colors.magenta.bold(`${main}`)
18 },
19 commandLabel: (str, icon = TEST_ICON) => {
20 return colors.cyan.bold(`\n ${icon} ${str}\n`)
21 },
22 raw: str => {
23 return JSON.stringify(str)
24 },
25 colors: require('chalk'),
26 terminal: require('window-size'),
27 stripAnsi: require('strip-ansi')
28}