"You are not defined by your code"
Receive all your favorite Error Affirmations, when you need them most!
With an easy install and a variety of options for customization, our Jest Reporter is sure to help soften the blow from any failing tests and give you the confidence to carry on!
- Affirmations are automatically displayed alongside your Jest test report, whenever your tests fail.
- Affirmations are fetched from the Error Affirmations API, which uses Affirmations submitted from users worldwide.
- Customize the look and feel with our large selection of color palettes and border themes!
- Change mode to "info" to reveal instructions and configuration options in your terminal.
1. Install using npm
npm i --save-dev error-affirmations
2. Configure Jest to use our custom reporter by putting the following in your package.json
"jest": {
"reporters":
[
"default",
"error-affirmations"
]
},
3. Run Jest as usual
jest
4. Receive an Error Affirmation!
Optionally change the Color-Palette and Border-Theme by adding an extra config in your package.json
jest: {
reporters: [
"default",
["error-affirmations",
{
colorTheme: "driven",
borderTheme: "waves",
mode: "normal",
},
],
],
}
Here, we have selected "driven" as the color theme and "waves" as the border theme. You may change these values to suit your own preferences!
To see a list of all the available colors and borders, change the "mode"
to "info"
and the next time your affirmation is displayed, the following info will appear:
The "mode"
may also be set to "minimal"
which will hide any borders and just show the affirmations.