diff --git a/lib/metaltest.test.js b/lib/metaltest.test.js index 0058e59..5d0ee32 100644 --- a/lib/metaltest.test.js +++ b/lib/metaltest.test.js @@ -13,9 +13,9 @@ test('throw', () => { }, { name: 'Error', message: 'message' }) }) -import { runifmain, consolereporter } from '../index.js' +import { runifmain, summaryreporter } from '../index.js' await runifmain(import.meta, async () => { - const stats = await test.run(consolereporter()) + const stats = await test.run(summaryreporter()) assert.equal(stats.success, 4) assert.equal(stats.fail, 0) assert.equal(stats.total, 4) diff --git a/lib/stackparser.test.js b/lib/stackparser.test.js index e1eb735..600f5d6 100644 --- a/lib/stackparser.test.js +++ b/lib/stackparser.test.js @@ -17,5 +17,5 @@ test('Diff', () => { } }) -import { runifmain, consolereporter } from '../index.js' -await runifmain(import.meta, () => test.run(consolereporter())) +import { runifmain, summaryreporter } from '../index.js' +await runifmain(import.meta, () => test.run(summaryreporter())) diff --git a/lib/suite.js b/lib/suite.js index d2beca1..07cc0d3 100644 --- a/lib/suite.js +++ b/lib/suite.js @@ -26,7 +26,7 @@ const getStackAbsolutePaths = () => { .map(filename => dirname(fileURLToPath(filename))) } -import { consolereporter, totalreporter } from 'metaltest' +import { summaryreporter, totalreporter } from 'metaltest' const suite = async (folder = '.') => { const absolutePaths = getStackAbsolutePaths() const absolutePath = absolutePaths[2] @@ -47,7 +47,7 @@ const suite = async (folder = '.') => { continue } - await test.run(consolereporter(), total) + await test.run(summaryreporter(), total) } for (const file of fileIgnored) { diff --git a/reporter/index.js b/reporter/index.js index 3432814..30b55a0 100644 --- a/reporter/index.js +++ b/reporter/index.js @@ -1,4 +1,4 @@ -export { consolereporter } from './consolereporter.js' +export { summaryreporter } from './summaryreporter.js' export { linereporter } from './linereporter.js' export { totalreporter } from './totalreporter.js' export { errorreporter } from './errorreporter.js' \ No newline at end of file diff --git a/reporter/consolereporter.js b/reporter/summaryreporter.js similarity index 86% rename from reporter/consolereporter.js rename to reporter/summaryreporter.js index f77b55d..1c089d2 100644 --- a/reporter/consolereporter.js +++ b/reporter/summaryreporter.js @@ -2,7 +2,7 @@ import chalk from 'chalk' const log = (...args) => process.stdout.write(...args) -const consolereporter = () => { +const summaryreporter = () => { const report = { start: (title) => { @@ -22,4 +22,4 @@ const consolereporter = () => { return report } -export { consolereporter } \ No newline at end of file +export { summaryreporter } \ No newline at end of file