Update metrics.test.js

This commit is contained in:
lowlighter
2021-06-05 23:27:14 +02:00
parent 7f2143c3f4
commit b24c26fdfa

View File

@@ -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)
}