Giter VIP home page Giter VIP logo

jest-performance-reporter's Introduction

Overview

🧐 Identify slow tests during development

📚 Create json or csv report including the test execution times

yarn add -DE @jest-performance-reporter/core

Example test run

Setup

Configure jest to use this reporter via the jest section in the package.json or your jest config.

{
  "reporters": [
    "default",
    [
      "@jest-performance-reporter/core",
      {
        "errorAfterMs": 1000,
        "warnAfterMs": 500,
        "logLevel": "warn",
        "maxItems": 5,
        "jsonReportPath": "performance-report.json",
        "csvReportPath": "performance-report.csv"
      }
    ]
  ]
}

The "default"-reporter creates the default jest output. If you don't need it, of course you can remove it.

jest-performance-reporter's People

Contributors

sholzmayer avatar

Stargazers

asc at DI avatar Frank Parejo avatar  avatar David Gonzalez avatar Cathal Mac Donnacha avatar Catherine Davie avatar Roman avatar Brian Vanderbusch avatar Andrew Moss avatar Matheus Marabesi avatar  avatar Simon Holzmayer avatar  avatar david harvey avatar Marcus S. Abildskov avatar Christian Schröter avatar Klara Fleischmann avatar

Watchers

James Cloos avatar  avatar

Forkers

miffili byrnie311

jest-performance-reporter's Issues

Add description for reporter options in README

It would be cool, if you, author, added a description of options for you package. I mean, for what parameters in my config influence to:

{
    errorAfterMs: 200,
    warnAfterMs: 100,
    logLevel: 'error',
    maxItems: 10,
}

package.json missing License in core

Can you add a license field to the core/package.json? I know the project is MIT, but unfortunately it wreaks havoc with some scanning tools, and this is the one PR I can't make for legal reasons.

No License specified

I would love to use this package but the lack of license prevents me from doing so in a legal way. Would you consider adding the license details to the package?

Won't create reports at a path if directory (or directories) doesn't exist

This works:

reporters: [
    "default",
    [
      "@jest-performance-reporter/core",
      {
        "errorAfterMs": 3000,
        "warnAfterMs": 1000,
        "logLevel": "warn",
        "jsonReportPath": "performance-report.json"
      }
    ]

However, this fails:

reporters: [
    "default",
    [
      "@jest-performance-reporter/core",
      {
        "errorAfterMs": 3000,
        "warnAfterMs": 1000,
        "logLevel": "warn",
        "jsonReportPath": "reports/performance-report.json"
      }
    ]
Running coverage on untested files...Error: ENOENT: no such file or directory, open 'reports/performance-report.json'
....
  errno: -2,
  syscall: 'open',
  code: 'ENOENT',
  path: 'reports/performance-report.json'
}

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.