Rename to summaryreporter

master
Frédéric Matte 2022-12-05 22:26:51 -05:00
parent 6609486566
commit 850240e9ef
5 changed files with 9 additions and 9 deletions

View File

@ -13,9 +13,9 @@ test('throw', () => {
}, { name: 'Error', message: 'message' }) }, { name: 'Error', message: 'message' })
}) })
import { runifmain, consolereporter } from '../index.js' import { runifmain, summaryreporter } from '../index.js'
await runifmain(import.meta, async () => { 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.success, 4)
assert.equal(stats.fail, 0) assert.equal(stats.fail, 0)
assert.equal(stats.total, 4) assert.equal(stats.total, 4)

View File

@ -17,5 +17,5 @@ test('Diff', () => {
} }
}) })
import { runifmain, consolereporter } from '../index.js' import { runifmain, summaryreporter } from '../index.js'
await runifmain(import.meta, () => test.run(consolereporter())) await runifmain(import.meta, () => test.run(summaryreporter()))

View File

@ -26,7 +26,7 @@ const getStackAbsolutePaths = () => {
.map(filename => dirname(fileURLToPath(filename))) .map(filename => dirname(fileURLToPath(filename)))
} }
import { consolereporter, totalreporter } from 'metaltest' import { summaryreporter, totalreporter } from 'metaltest'
const suite = async (folder = '.') => { const suite = async (folder = '.') => {
const absolutePaths = getStackAbsolutePaths() const absolutePaths = getStackAbsolutePaths()
const absolutePath = absolutePaths[2] const absolutePath = absolutePaths[2]
@ -47,7 +47,7 @@ const suite = async (folder = '.') => {
continue continue
} }
await test.run(consolereporter(), total) await test.run(summaryreporter(), total)
} }
for (const file of fileIgnored) { for (const file of fileIgnored) {

View File

@ -1,4 +1,4 @@
export { consolereporter } from './consolereporter.js' export { summaryreporter } from './summaryreporter.js'
export { linereporter } from './linereporter.js' export { linereporter } from './linereporter.js'
export { totalreporter } from './totalreporter.js' export { totalreporter } from './totalreporter.js'
export { errorreporter } from './errorreporter.js' export { errorreporter } from './errorreporter.js'

View File

@ -2,7 +2,7 @@ import chalk from 'chalk'
const log = (...args) => process.stdout.write(...args) const log = (...args) => process.stdout.write(...args)
const consolereporter = () => { const summaryreporter = () => {
const report = { const report = {
start: (title) => { start: (title) => {
@ -22,4 +22,4 @@ const consolereporter = () => {
return report return report
} }
export { consolereporter } export { summaryreporter }