reporter
Specify the reporter for test execution.
Reportersβ
poku (default)β
- Logs all
describe,it,testandasserttitles and messages, including their modifiers. - Logs only the file name for errors during the execution, then lists all logs for each failed file at the running end.
dot (inspired by Mocha)β
- Logs a dot for each success file test and
Ffor each failed file. - Lists all logs for each failed file at the running end.
compact (partially inspired by modern Tap)β
- Lists only file paths with
PASSorFAILand, in case of failures, lists all logs for each failed file at the running end.
focusβ
- Logs only errors (in real time). If there is no error, it just logs a small footnote resume.
verboseβ
- Just like the default (
poku), but logs errors both in real time and also at the running end.
classicβ
- The standard report style from version 2 to preserve our history π·
Usageβ
CLIβ
- poku
- dot
- compact
- focus
- verbose
- classic
npx poku --reporter=poku # default
npx poku --reporter=dot
npx poku --reporter=compact
npx poku --reporter=focus
npx poku --reporter=verbose
npx poku --reporter=classic
- Short flag:
-r.
Config Fileβ
- poku
- dot
- compact
- focus
- verbose
- classic
{
// "$schema": "https://poku.io/schemas/configs.json",
"reporter": "poku" // default
}
const { defineConfig } = require('poku');
module.exports = defineConfig({
reporter: 'poku', // default
});
{
// "$schema": "https://poku.io/schemas/configs.json",
"reporter": "dot"
}
const { defineConfig } = require('poku');
module.exports = defineConfig({
reporter: 'dot',
});
{
// "$schema": "https://poku.io/schemas/configs.json",
"reporter": "compact"
}
const { defineConfig } = require('poku');
module.exports = defineConfig({
reporter: 'compact',
});
{
// "$schema": "https://poku.io/schemas/configs.json",
"reporter": "focus"
}
const { defineConfig } = require('poku');
module.exports = defineConfig({
reporter: 'focus',
});
{
// "$schema": "https://poku.io/schemas/configs.json",
"reporter": "verbose"
}
const { defineConfig } = require('poku');
module.exports = defineConfig({
reporter: 'verbose',
});
{
// "$schema": "https://poku.io/schemas/configs.json",
"reporter": "classic"
}
const { defineConfig } = require('poku');
module.exports = defineConfig({
reporter: 'classic',
});
APIβ
- poku
- dot
- compact
- focus
- verbose
- classic
await poku('./test', {
reporter: 'poku', // default
});
await poku('./test', {
reporter: 'dot',
});
await poku('./test', {
reporter: 'compact',
});
await poku('./test', {
reporter: 'focus',
});
await poku('./test', {
reporter: 'verbose',
});
await poku('./test', {
reporter: 'classic',
});