From 850240e9ef9f8134d919e9f687f511f64cbdad66 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Matte?= Date: Mon, 5 Dec 2022 22:26:51 -0500 Subject: [PATCH] Rename to summaryreporter --- lib/metaltest.test.js | 4 ++-- lib/stackparser.test.js | 4 ++-- lib/suite.js | 4 ++-- reporter/index.js | 2 +- reporter/{consolereporter.js => summaryreporter.js} | 4 ++-- 5 files changed, 9 insertions(+), 9 deletions(-) rename reporter/{consolereporter.js => summaryreporter.js} (86%) 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