From a06bad161a7eb9fbcd74346b0a0e3b89b8ac0d48 Mon Sep 17 00:00:00 2001 From: jj Date: Mon, 10 Feb 2025 21:55:11 +0000 Subject: [PATCH] api/test: add env for configuring ignored tests --- api/src/util/test.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/api/src/util/test.js b/api/src/util/test.js index 25c822cc..7dd0450d 100644 --- a/api/src/util/test.js +++ b/api/src/util/test.js @@ -14,7 +14,11 @@ const getTests = (service) => loadJSON(getTestPath(service)); // services that are known to frequently fail due to external // factors (e.g. rate limiting) -const finnicky = new Set(['bilibili', 'instagram', 'facebook', 'youtube', 'vk', 'twitter', 'reddit']); +const finnicky = new Set( + typeof process.env.TEST_IGNORE_SERVICES === 'string' + ? process.env.TEST_IGNORE_SERVICES.split(',') + : ['bilibili', 'instagram', 'facebook', 'youtube', 'vk', 'twitter', 'reddit'] +); const runTestsFor = async (service) => { const tests = getTests(service);