diff --git a/suite.js b/suite.js index 443d8de..e8f1b79 100644 --- a/suite.js +++ b/suite.js @@ -30,6 +30,7 @@ import { consolereporter, totalreporter } from 'metaltest' const suite = async (folder = '.') => { const absolutePaths = getStackAbsolutePaths() const absolutePath = absolutePaths[2] + const fileIgnored = [] const total = totalreporter() @@ -40,9 +41,19 @@ const suite = async (folder = '.') => { const module = join(absolutePath, file) const { test } = await import(module) + + if (test === undefined) { + fileIgnored.push(file) + continue + } + await test.run(consolereporter(), total) } + for (const file of fileIgnored) { + console.log(`The file ${file} doesn't export the metaltest object`) + } + console.log(total.msg()) }