reporter
Specify the reporter for test execution.
Reporters
poku
(default)
- Logs all
describe
,it
,test
andassert
titles 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
F
for 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
PASS
orFAIL
and, 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',
});