From 669f803c3f9bb2c1f13e8458676f0ab8507cffae Mon Sep 17 00:00:00 2001 From: Jeff Dickey <216188+jdxcode@users.noreply.github.com> Date: Thu, 25 Jan 2018 02:44:49 -0800 Subject: [PATCH] test: fixed tests --- package.json | 2 +- test/errors.test.ts | 4 ++-- test/logger.test.ts | 10 +++++----- test/styled/object.test.ts | 2 +- test/styled/table.test.ts | 2 +- yarn.lock | 6 +++--- 6 files changed, 13 insertions(+), 13 deletions(-) diff --git a/package.json b/package.json index a0f0220b..9ff0b30b 100644 --- a/package.json +++ b/package.json @@ -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", diff --git a/test/errors.test.ts b/test/errors.test.ts index 887c7fb1..6a903ae2 100644 --- a/test/errors.test.ts +++ b/test/errors.test.ts @@ -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/) }) }) diff --git a/test/logger.test.ts b/test/logger.test.ts index b68eda50..4cc9b446 100644 --- a/test/logger.test.ts +++ b/test/logger.test.ts @@ -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() @@ -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}) @@ -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') @@ -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') @@ -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') diff --git a/test/styled/object.test.ts b/test/styled/object.test.ts index 578c3f2d..e6b61de1 100644 --- a/test/styled/object.test.ts +++ b/test/styled/object.test.ts @@ -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}, diff --git a/test/styled/table.test.ts b/test/styled/table.test.ts index ada147c1..120b5b77 100644 --- a/test/styled/table.test.ts +++ b/test/styled/table.test.ts @@ -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}, diff --git a/yarn.lock b/yarn.lock index 330ce62b..d5f7ce73 100644 --- a/yarn.lock +++ b/yarn.lock @@ -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"