mirror of
https://github.com/pybricks/pybricks-code.git
synced 2026-09-12 01:23:52 +00:00
ignore not-test code in coverage
This commit is contained in:
@@ -408,8 +408,9 @@ function* flashFirmware(action: FlashFirmwareFlashAction): Generator {
|
||||
|
||||
const checksum = firmware.reduce((prev, curr) => prev ^ curr, 0xff);
|
||||
if (flash.checksum !== checksum) {
|
||||
// istanbul ignore next
|
||||
if (process.env.NODE_ENV !== 'test') {
|
||||
console.log(
|
||||
console.error(
|
||||
'checksum:',
|
||||
flash.checksum.toString(16).padStart(2, '0').padStart(4, '0x'),
|
||||
checksum.toString(16).padStart(2, '0').padStart(4, '0x'),
|
||||
|
||||
@@ -249,6 +249,7 @@ function* showFlashFirmwareError(
|
||||
break;
|
||||
case FailToFinishReasonType.HubError:
|
||||
yield* showSingleton(Level.Error, MessageId.FlashFirmwareHubError);
|
||||
// istanbul ignore next
|
||||
if (process.env.NODE_ENV !== 'test') {
|
||||
console.error(action.reason.hubError);
|
||||
}
|
||||
@@ -266,12 +267,14 @@ function* showFlashFirmwareError(
|
||||
break;
|
||||
case FailToFinishReasonType.ZipError:
|
||||
yield* showSingleton(Level.Error, MessageId.FlashFirmwareBadZipFile);
|
||||
// istanbul ignore next
|
||||
if (process.env.NODE_ENV !== 'test') {
|
||||
console.error(action.reason.err);
|
||||
}
|
||||
break;
|
||||
case FailToFinishReasonType.BadMetadata:
|
||||
yield* showSingleton(Level.Error, MessageId.FlashFirmwareBadMetadata);
|
||||
// istanbul ignore next
|
||||
if (process.env.NODE_ENV !== 'test') {
|
||||
console.error(action.reason.property, action.reason.problem);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user