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]);
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);
}
}

View File

@ -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:/);
});