Skip to content

Commit

Permalink
Stop using log-symbols directly
Browse files Browse the repository at this point in the history
  • Loading branch information
inukshuk committed Nov 25, 2021
1 parent 3db21cc commit 7282851
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 4 deletions.
3 changes: 1 addition & 2 deletions lib/main.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,6 @@ const { app } = require('electron')
const { version } = require('../package.json')
const yargs = require('yargs/yargs')
const ansi = require('ansi-colors')
const symbols = require('log-symbols')

// Add Electron-Mocha types to ensure they're known when
// parsing options from config files
Expand All @@ -28,7 +27,7 @@ exports.main = (argv = process.argv.slice(2)) => {
.command(run)
.fail((msg, err, yargs) => {
yargs.showHelp()
console.error(`\n${symbols.error} ${ansi.red('ERROR:')} ${msg}`)
console.error(`\n${ansi.red('ERROR:')} ${msg}`)
if (err) console.error(err.stack)
app.exit(1)
})
Expand Down
3 changes: 1 addition & 2 deletions lib/run.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@ const { createWindow } = require('electron-window')
const { errors, helpers, ONE_AND_DONES } = require('./mocha')
const run = require('mocha/lib/cli/run')
const ansi = require('ansi-colors')
const symbols = require('log-symbols')
const util = require('util')

exports.command = run.command
Expand Down Expand Up @@ -242,7 +241,7 @@ exports.handler = async argv => {
}

const fail = (error, trace) => {
console.error(`\n${symbols.error} ${ansi.red('ERROR:')} ${error.message}`)
console.error(`\n${ansi.red('ERROR:')} ${error.message}`)
if (trace && error.stack) console.error(error.stack)
app.exit(1)
}
Expand Down

0 comments on commit 7282851

Please sign in to comment.