api/test: add env for configuring ignored tests

This commit is contained in:
jj 2025-02-10 21:55:11 +00:00
parent 8f57881a68
commit a06bad161a
No known key found for this signature in database

View file

@ -14,7 +14,11 @@ const getTests = (service) => loadJSON(getTestPath(service));
// services that are known to frequently fail due to external // services that are known to frequently fail due to external
// factors (e.g. rate limiting) // 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 runTestsFor = async (service) => {
const tests = getTests(service); const tests = getTests(service);