Skip to content

VSCode-Empaths/VSCode-Affirmations-Jest-Reporter

Repository files navigation

Error Affirmations - Jest Reporter

"You are not defined by your code"

Error Affirmations Jest Reporter Header

npmGitHub

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!

Made with

JavaScript Node.js 

Features

  • 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.

Preview

Error-Affirmations-Preview

Usage

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!

Error Affirmations Jest Reporter Screenshot 1

Configure

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:

Error Affirmations Info Window Screenshot

The "mode" may also be set to "minimal" which will hide any borders and just show the affirmations.

Authors

Check Out Our Other Apps!

VSCode Extension

Try - GitHub

Error Affirmations VSCode Extension Preview

Website

Try - GitHub

Error Affirmations Website Preview

Backend

GitHub

About

Receive all your favorite Error Affirmations, when you need them most!

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published