tests: drop fatal test and ignore

This commit is contained in:
Rhys Arkins 2018-09-25 12:30:44 +02:00
parent 1135b02252
commit 8c27d6fb23
3 changed files with 3 additions and 9 deletions

View file

@ -75,6 +75,7 @@ function getDetails(rec) {
.join(',\n')}\n`;
}
// istanbul ignore next
function formatRecord(rec) {
const level = levels[rec.level];
const msg = `${indent(rec.msg)}`;
@ -91,6 +92,7 @@ function RenovateStream() {
util.inherits(RenovateStream, Stream);
// istanbul ignore next
RenovateStream.prototype.write = function write(data) {
this.emit('data', formatRecord(data));
return true;

View file

@ -52,7 +52,7 @@ async function start() {
}
logger.setMeta({});
logger.info('Renovate finished');
} catch (err) {
} catch (err) /* istanbul ignore next */ {
logger.fatal({ err }, `Renovate fatal error: ${err.message}`);
}
}

View file

@ -32,12 +32,4 @@ describe('lib/workers/global', () => {
expect(configParser.parseConfigs.mock.calls.length).toBe(1);
expect(repositoryWorker.renovateRepository.mock.calls.length).toBe(2);
});
it('catches errors', async () => {
configParser.parseConfigs.mockImplementationOnce(() => {
throw new Error(
'This fatal error is thrown for testing purposes and can be ignored'
);
});
await globalWorker.start();
});
});