From 49d69bc72a7eb0429381e017a479f34d206864f0 Mon Sep 17 00:00:00 2001 From: bertrandda Date: Thu, 12 Dec 2024 22:34:40 +0100 Subject: [PATCH] Fix tests --- server/services/google-cast/lib/google_cast.setValue.js | 1 - .../services/google-cast/lib/google_cast.setValue.test.js | 5 +++++ 2 files changed, 5 insertions(+), 1 deletion(-) diff --git a/server/services/google-cast/lib/google_cast.setValue.js b/server/services/google-cast/lib/google_cast.setValue.js index 1f350ef958..ee787918fc 100644 --- a/server/services/google-cast/lib/google_cast.setValue.js +++ b/server/services/google-cast/lib/google_cast.setValue.js @@ -51,7 +51,6 @@ async function setValue(device, deviceFeature, value, options) { player.on('status', async (status) => { logger.debug('status broadcast playerState=%s', status.playerState); - if (status.idleReason === 'FINISHED') { await setVolume({ level }); } diff --git a/server/test/services/google-cast/lib/google_cast.setValue.test.js b/server/test/services/google-cast/lib/google_cast.setValue.test.js index 82235a6b69..36b28aa24a 100644 --- a/server/test/services/google-cast/lib/google_cast.setValue.test.js +++ b/server/test/services/google-cast/lib/google_cast.setValue.test.js @@ -37,6 +37,11 @@ class GoogleCastClient { cb({ message: 'this is an error' }); } + // eslint-disable-next-line class-methods-use-this + getVolume(cb) { + cb(null, { level: 1 }); + } + // eslint-disable-next-line class-methods-use-this setVolume(volume, cb) { cb(null, 30);