1 | process.env.NODE_ENV = 'test'
|
2 |
|
3 | const MAIN_LINE = '⏤'
|
4 | const MAIN_ICON = '🚧'
|
5 | const DESCRIBE_ICON = '✏️'
|
6 | const TEST_ICON = '📝'
|
7 |
|
8 | module.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 | }
|