ble/sagas: don't spam console in tests

This commit is contained in:
David Lechner
2022-07-15 11:42:44 -05:00
parent ecd32e61b9
commit e9f9aca3ef
+5 -3
View File
@@ -260,9 +260,11 @@ function* handleBleConnectPybricks(): Generator {
try { try {
pnpIdChar = yield* call([deviceInfoService, 'getCharacteristic'], pnpIdUUID); pnpIdChar = yield* call([deviceInfoService, 'getCharacteristic'], pnpIdUUID);
} catch (err) { } catch (err) {
console.warn( if (process.env.NODE_ENV !== 'test') {
'PnP ID characteristic requires Pybricks firmware v3.1.0a1 or later', console.warn(
); 'PnP ID characteristic requires Pybricks firmware v3.1.0a1 or later',
);
}
} }
if (pnpIdChar) { if (pnpIdChar) {