Skip to content
This repository has been archived by the owner on Feb 1, 2022. It is now read-only.

Commit

Permalink
fix: use old error style
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Jan 16, 2018
1 parent e0394f6 commit f10be7d
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
2 changes: 1 addition & 1 deletion src/errors.ts
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ import {inspect} from 'util'
import {CLI} from '.'
import {ErrorMessage, Message} from './message'

const arrow = process.platform === 'win32' ? ' ×' : ' '
const arrow = process.platform === 'win32' ? ' !' : ' '

function bangify(msg: string, c: string): string {
const lines = msg.split('\n')
Expand Down
3 changes: 2 additions & 1 deletion test/errors.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,10 +10,11 @@ beforeEach(() => {
describe.stderr('errors', () => {
it('warns', () => {
cli.warn('foobar')
expect(output.stderr).to.equal(' foobar\n')
expect(output.stderr).to.equal(' foobar\n')
})

it('errors', () => {
expect(() => cli.error('foobar')).to.throw(/foobar/)
expect(output.stderr).to.equal(' ▸ foobar\n')
})
})

0 comments on commit f10be7d

Please sign in to comment.