chore: minor fix in tests

This commit is contained in:
Estevao Soares dos Santos 2022-03-10 00:17:27 +00:00
parent 7acd65e498
commit 1f4a9885cc
2 changed files with 4 additions and 3 deletions

View File

@ -282,7 +282,7 @@ function makehtmlCommand (options, cmd) {
converter.addExtension(ext, options.extensions[i]); converter.addExtension(ext, options.extensions[i]);
messenger.printMsg(options.extensions[i] + ' loaded...'); messenger.printMsg(options.extensions[i] + ' loaded...');
} catch (e) { } 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); messenger.errorExit(e);
} }
} }

View File

@ -180,10 +180,11 @@ describe('showdown cli', function () {
}); });
it('should display errors', function () { it('should display errors', function () {
var proc = spawnCLI('makehtml', ['-q', '-i']); var proc = spawnCLI('makehtml', ['-q', '-i', '-e', 'foo'], {input: 'f'});
//proc.status.should.equal(1); proc.status.should.equal(1);
expect(proc.output).to.be.null; // jshint ignore:line expect(proc.output).to.be.null; // jshint ignore:line
proc.stdout.should.equal(''); proc.stdout.should.equal('');
console.log(proc.stderr);
proc.stderr.should.match(/^ERROR:/); proc.stderr.should.match(/^ERROR:/);
}); });