From e9f9aca3ef51d800ffe37cbe4e71171bd514babf Mon Sep 17 00:00:00 2001 From: David Lechner Date: Fri, 15 Jul 2022 11:42:44 -0500 Subject: [PATCH] ble/sagas: don't spam console in tests --- src/ble/sagas.ts | 8 +++++--- 1 file changed, 5 insertions(+), 3 deletions(-) diff --git a/src/ble/sagas.ts b/src/ble/sagas.ts index a5cc6d1e..57fee43f 100644 --- a/src/ble/sagas.ts +++ b/src/ble/sagas.ts @@ -260,9 +260,11 @@ function* handleBleConnectPybricks(): Generator { try { pnpIdChar = yield* call([deviceInfoService, 'getCharacteristic'], pnpIdUUID); } catch (err) { - console.warn( - 'PnP ID characteristic requires Pybricks firmware v3.1.0a1 or later', - ); + if (process.env.NODE_ENV !== 'test') { + console.warn( + 'PnP ID characteristic requires Pybricks firmware v3.1.0a1 or later', + ); + } } if (pnpIdChar) {