From 1f4a9885ccd7fa9402d3dfbc930eb94d488c5857 Mon Sep 17 00:00:00 2001 From: Estevao Soares dos Santos Date: Thu, 10 Mar 2022 00:17:27 +0000 Subject: [PATCH] chore: minor fix in tests --- src/cli/cli.js | 2 +- test/unit/cli.js | 5 +++-- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/src/cli/cli.js b/src/cli/cli.js index 5e9e356..0f5876c 100644 --- a/src/cli/cli.js +++ b/src/cli/cli.js @@ -282,7 +282,7 @@ function makehtmlCommand (options, cmd) { converter.addExtension(ext, options.extensions[i]); messenger.printMsg(options.extensions[i] + ' loaded...'); } catch (e) { - messenger.printError('Could not load extension ' + options.extensions[i] + '. Reason:'); + messenger.printError('ERROR: Could not load extension ' + options.extensions[i] + '. Reason:'); messenger.errorExit(e); } } diff --git a/test/unit/cli.js b/test/unit/cli.js index 6c89db1..3d70899 100644 --- a/test/unit/cli.js +++ b/test/unit/cli.js @@ -180,10 +180,11 @@ describe('showdown cli', function () { }); it('should display errors', function () { - var proc = spawnCLI('makehtml', ['-q', '-i']); - //proc.status.should.equal(1); + var proc = spawnCLI('makehtml', ['-q', '-i', '-e', 'foo'], {input: 'f'}); + proc.status.should.equal(1); expect(proc.output).to.be.null; // jshint ignore:line proc.stdout.should.equal(''); + console.log(proc.stderr); proc.stderr.should.match(/^ERROR:/); });