From cb2f0b54a09f809e3f30316db7bb36405b057b21 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Fr=C3=A9d=C3=A9ric=20Matte?= Date: Sun, 4 Dec 2022 23:43:20 -0500 Subject: [PATCH] Move reporter to sub-folder --- index.js | 4 +--- consolereporter.js => reporter/consolereporter.js | 2 +- reporter/index.js | 5 +++++ linereporter.js => reporter/linereporter.js | 2 +- totalreporter.js => reporter/totalreporter.js | 0 5 files changed, 8 insertions(+), 5 deletions(-) rename consolereporter.js => reporter/consolereporter.js (92%) create mode 100644 reporter/index.js rename linereporter.js => reporter/linereporter.js (91%) rename totalreporter.js => reporter/totalreporter.js (100%) diff --git a/index.js b/index.js index 01c40ad..c2d36e4 100644 --- a/index.js +++ b/index.js @@ -1,7 +1,5 @@ -import { consolereporter } from './consolereporter.js' -import { linereporter } from './linereporter.js' -import { totalreporter } from './totalreporter.js' +import { consolereporter, linereporter, totalreporter } from './reporter/index.js' import { runifmain } from './runifmain.js' import { suite } from './suite.js' diff --git a/consolereporter.js b/reporter/consolereporter.js similarity index 92% rename from consolereporter.js rename to reporter/consolereporter.js index f6cac23..6f6f7be 100644 --- a/consolereporter.js +++ b/reporter/consolereporter.js @@ -29,7 +29,7 @@ const consolereporter = () => { return report } -import { stackParser } from './stackparser.js' +import { stackParser } from '../stackparser.js' const prettyError = (error) => { if (typeof error == 'string') { log(chalk.yellowBright(error)) diff --git a/reporter/index.js b/reporter/index.js new file mode 100644 index 0000000..2a8d4bc --- /dev/null +++ b/reporter/index.js @@ -0,0 +1,5 @@ +import { consolereporter } from './consolereporter.js' +import { linereporter } from './linereporter.js' +import { totalreporter } from './totalreporter.js' + +export { consolereporter, linereporter, totalreporter } \ No newline at end of file diff --git a/linereporter.js b/reporter/linereporter.js similarity index 91% rename from linereporter.js rename to reporter/linereporter.js index e52b167..2fa0c43 100644 --- a/linereporter.js +++ b/reporter/linereporter.js @@ -1,5 +1,5 @@ import chalk from 'chalk' -import { stackParser } from './stackparser.js' +import { stackParser } from '../stackparser.js' const linereporter = () => { const lines = [] diff --git a/totalreporter.js b/reporter/totalreporter.js similarity index 100% rename from totalreporter.js rename to reporter/totalreporter.js