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

Commit

Permalink
test: fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
jdx committed Jan 25, 2018
1 parent 87db353 commit 669f803
Show file tree
Hide file tree
Showing 6 changed files with 13 additions and 13 deletions.
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@
"chai": "^4.1.2",
"eslint": "^4.16.0",
"eslint-config-dxcli": "^1.1.4",
"fancy-mocha": "^0.3.1",
"fancy-mocha": "^0.3.2",
"husky": "^0.14.3",
"mocha": "^5.0.0",
"mocha-junit-reporter": "^1.16.0",
Expand Down
4 changes: 2 additions & 2 deletions test/errors.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,13 @@ beforeEach(() => {
describe('errors', () => {
fancy()
.stderr()
.it('warns', output => {
.end('warns', output => {
cli.warn('foobar')
expect(output.stderr).to.equal(' ▸ foobar\n')
})

fancy()
.it('errors', () => {
.end('errors', () => {
expect(() => cli.error('foobar')).to.throw(/foobar/)
})
})
10 changes: 5 additions & 5 deletions test/logger.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ describe('logger', () => {
fancy()
.stdout()
.stderr()
.it('does nothing if no error.log', async () => {
.end('does nothing if no error.log', async () => {
cli.config.errlog = undefined
cli.info('foobar')
await cli.done()
Expand All @@ -29,7 +29,7 @@ describe('logger', () => {
fancy()
.stdout()
.stderr()
.it('writes stuff out', async () => {
.end('writes stuff out', async () => {
cli.warn('showwarning')
cli.info('hideme')
cli.error('showerror', {exit: false})
Expand All @@ -40,7 +40,7 @@ describe('logger', () => {
fancy()
.stdout()
.stderr()
.it('can change log level', async () => {
.end('can change log level', async () => {
cli.config.logLevel = 'debug'
cli.warn('showwarning')
cli.info('showme')
Expand All @@ -53,7 +53,7 @@ describe('logger', () => {
fancy()
.stdout()
.stderr()
.it('uses scope', async () => {
.end('uses scope', async () => {
let _cli = cli.scope('mynewscope')
_cli.warn('showwarning')
_cli.info('hideme')
Expand All @@ -65,7 +65,7 @@ describe('logger', () => {
fancy()
.stdout()
.stderr()
.it('does not create file if no output', async () => {
.end('does not create file if no output', async () => {
cli.trace('mycontent')
cli.debug('mycontent')
cli.info('mycontent')
Expand Down
2 changes: 1 addition & 1 deletion test/styled/object.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import cli from '../../src'
describe('styled/table', () => {
fancy()
.stdout()
.it('shows a table', output => {
.end('shows a table', output => {
cli.styledObject([
{foo: 1, bar: 1},
{foo: 2, bar: 2},
Expand Down
2 changes: 1 addition & 1 deletion test/styled/table.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ import cli from '../../src'
describe('styled/table', () => {
fancy()
.stdout()
.it('shows a table', output => {
.end('shows a table', output => {
cli.table([
{foo: 1, bar: 1},
{foo: 2, bar: 2},
Expand Down
6 changes: 3 additions & 3 deletions yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -1618,9 +1618,9 @@ extsprintf@^1.2.0:
version "1.4.0"
resolved "https://registry.yarnpkg.com/extsprintf/-/extsprintf-1.4.0.tgz#e2689f8f356fad62cca65a3a91c5df5f9551692f"

fancy-mocha@^0.3.1:
version "0.3.1"
resolved "https://registry.yarnpkg.com/fancy-mocha/-/fancy-mocha-0.3.1.tgz#2848e4644b3732c06392cfc2fdb2d4d5d4112423"
fancy-mocha@^0.3.2:
version "0.3.2"
resolved "https://registry.yarnpkg.com/fancy-mocha/-/fancy-mocha-0.3.2.tgz#4bcc8dc4f323224ce0733bd1a093d8c485852406"
dependencies:
lodash "^4.17.4"
stdout-stderr "^0.1.4"
Expand Down

0 comments on commit 669f803

Please sign in to comment.