From b24c26fdfac99a872a5388cb34f761f9dd77ac56 Mon Sep 17 00:00:00 2001 From: lowlighter <22963968+lowlighter@users.noreply.github.com> Date: Sat, 5 Jun 2021 23:27:14 +0200 Subject: [PATCH] Update metrics.test.js --- tests/metrics.test.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/tests/metrics.test.js b/tests/metrics.test.js index 140e6094..ee0b2406 100644 --- a/tests/metrics.test.js +++ b/tests/metrics.test.js @@ -97,12 +97,12 @@ const tests = [] for (const name in metadata.plugins) { const cases = yaml .load(fs.readFileSync(path.join(__dirname, "../source/plugins", name, "tests.yml"), "utf8")) - .map(({ name: test, with: inputs, modes = [], timeout }) => { + ?.map(({ name: test, with: inputs, modes = [], timeout }) => { const skip = new Set(Object.entries(metadata.templates).filter(([_, { readme: { compatibility } }]) => !compatibility[name]).map(([template]) => template)) if (!(metadata.plugins[name].supports.includes("repository"))) skip.add("repository") return [test, inputs, { skip: [...skip], modes, timeout }] - }) + }) ?? [] tests.push(...cases) }