diff --git a/tests/metrics.test.js b/tests/metrics.test.js index 140e6094df8..ee0b240683c 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) }