mirror of
https://github.com/renovatebot/renovate.git
synced 2025-01-12 06:56:24 +00:00
tests: drop fatal test and ignore
This commit is contained in:
parent
1135b02252
commit
8c27d6fb23
3 changed files with 3 additions and 9 deletions
|
@ -75,6 +75,7 @@ function getDetails(rec) {
|
||||||
.join(',\n')}\n`;
|
.join(',\n')}\n`;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
// istanbul ignore next
|
||||||
function formatRecord(rec) {
|
function formatRecord(rec) {
|
||||||
const level = levels[rec.level];
|
const level = levels[rec.level];
|
||||||
const msg = `${indent(rec.msg)}`;
|
const msg = `${indent(rec.msg)}`;
|
||||||
|
@ -91,6 +92,7 @@ function RenovateStream() {
|
||||||
|
|
||||||
util.inherits(RenovateStream, Stream);
|
util.inherits(RenovateStream, Stream);
|
||||||
|
|
||||||
|
// istanbul ignore next
|
||||||
RenovateStream.prototype.write = function write(data) {
|
RenovateStream.prototype.write = function write(data) {
|
||||||
this.emit('data', formatRecord(data));
|
this.emit('data', formatRecord(data));
|
||||||
return true;
|
return true;
|
||||||
|
|
|
@ -52,7 +52,7 @@ async function start() {
|
||||||
}
|
}
|
||||||
logger.setMeta({});
|
logger.setMeta({});
|
||||||
logger.info('Renovate finished');
|
logger.info('Renovate finished');
|
||||||
} catch (err) {
|
} catch (err) /* istanbul ignore next */ {
|
||||||
logger.fatal({ err }, `Renovate fatal error: ${err.message}`);
|
logger.fatal({ err }, `Renovate fatal error: ${err.message}`);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -32,12 +32,4 @@ describe('lib/workers/global', () => {
|
||||||
expect(configParser.parseConfigs.mock.calls.length).toBe(1);
|
expect(configParser.parseConfigs.mock.calls.length).toBe(1);
|
||||||
expect(repositoryWorker.renovateRepository.mock.calls.length).toBe(2);
|
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();
|
|
||||||
});
|
|
||||||
});
|
});
|
||||||
|
|
Loading…
Reference in a new issue