diff --git a/src/cli/cli.js b/src/cli/cli.js index 89f6b1a5..399fb67d 100755 --- a/src/cli/cli.js +++ b/src/cli/cli.js @@ -2,11 +2,12 @@ 'use strict'; -const ace = require('../core/ace.js'); - const fs = require('fs'); const meow = require('meow'); const path = require('path'); +const winston = require('winston'); + +const ace = require('../core/ace.js'); const logger = require('../core/logger.js'); const cli = meow(` diff --git a/tests/__tests__/__snapshots__/cli.test.js.snap b/tests/__tests__/__snapshots__/cli.test.js.snap index df15e458..799aa9b1 100644 --- a/tests/__tests__/__snapshots__/cli.test.js.snap +++ b/tests/__tests__/__snapshots__/cli.test.js.snap @@ -1,7 +1,7 @@ // Jest Snapshot v1, https://goo.gl/fbAQLP exports[`test existing output 1`] = ` -"Output directory is not empty. +"warn: Output directory is not empty. Running Ace would override the following files or directories: @@ -38,9 +38,10 @@ exports[`test help 1`] = ` " `; -exports[`test no input 1`] = ` -"Input required +exports[`test no input 1`] = `"error: Input required"`; +exports[`test no input 2`] = ` +" Ace by DAISY, an Accessibility Checker for EPUB Usage: ace [options] diff --git a/tests/__tests__/cli.test.js b/tests/__tests__/cli.test.js index f152f949..0bc2c70f 100644 --- a/tests/__tests__/cli.test.js +++ b/tests/__tests__/cli.test.js @@ -9,7 +9,7 @@ const path = require('path'); test('test no input', () => { const { stdout, stderr, status } = ace([]); expect(status).toBe(1); - expect(stderr).toBe(''); + expect(stderr.trim()).toMatchSnapshot(); expect(stdout).toMatchSnapshot(); });