{"_id":"@90poe/jest-performant-warnings-stats-reporter","_rev":"7-d02500aa8fa9b2dbb1bf92f330718600","name":"@90poe/jest-performant-warnings-stats-reporter","dist-tags":{"latest":"1.0.0"},"versions":{"1.0.0":{"name":"@90poe/jest-performant-warnings-stats-reporter","version":"1.0.0","keywords":["jest","reporter","90poe","jest-reporter","performant","slow-tests"],"author":{"name":"90poe"},"license":"MIT","_id":"@90poe/jest-performant-warnings-stats-reporter@1.0.0","maintainers":[{"name":"paulanton","email":"cloud@90poe.io"},{"name":"concourseci90poe","email":"concourse.ci@90poe.io"},{"name":"slopez90poe","email":"samuel.lopez@90poe.io"},{"name":"garylloyd","email":"gary.lloyd@90poe.io"},{"name":"fabmos","email":"mosconfabrizio@gmail.com"},{"name":"pkujawa","email":"piotrkujawa.dev@gmail.com"},{"name":"andrew.wilde","email":"about.wilde@gmail.com"},{"name":"simont90poe","email":"Simon.Truss@90poe.io"},{"name":"mdmd","email":"mdudek15@gmail.com"},{"name":"annmedvid","email":"anasim669@gmail.com"},{"name":"dhorelik","email":"dmytro.gorelik@gmail.com"},{"name":"kletchatii","email":"kletchatii@gmail.com"},{"name":"kwedo","email":"hello@kwedo.com"},{"name":"rostk","email":"rkaniuchenko@gmail.com"},{"name":"andreeey","email":"bobryshev.andrey@gmail.com"},{"name":"vasilich6107","email":"v.ditsyak@gmail.com"},{"name":"nataki","email":"nat.aki.nat.aki@gmail.com"},{"name":"drdezmond","email":"dr.dezmond@gmail.com"},{"name":"kapiroska","email":"etherreals777@gmail.com"},{"name":"volodymyrzamyshliaiev","email":"Volodymyr.Zamyshliaiev@90poe.io"},{"name":"patrick12","email":"Petro.Kvartsianyi@90poe.io"},{"name":"h12","email":"hwang.dev@gmail.com"},{"name":"meetmeleave","email":"vladimir.martynenko.work@gmail.com"},{"name":"madelgeek","email":"daria.gorchylina@gmail.com"},{"name":"icho","email":"ivan.chobotar@90poe.io"},{"name":"e_vashchuk","email":"evgeniy.vashchuk@90poe.io"},{"name":"anatolii.omelchenko","email":"anatolii.omelchenko@90poe.io"},{"name":"nadiia.daliavska","email":"nadiadaliavska@gmail.com"},{"name":"iuriizaporozhets","email":"iurii.zaporozhets@gmail.com"},{"name":"achumachenko","email":"arkadii.chumachenko@90poe.io"},{"name":"volomar","email":"vl.martyniuk@gmail.com"},{"name":"anplotkina","email":"anastasiia.plotkina@90poe.io"}],"homepage":"https://github.com/90poe/jest-performant-warnings-stats-reporter#readme","bugs":{"url":"https://github.com/90poe/jest-performant-warnings-stats-reporter/issues"},"dist":{"shasum":"f20dac3739f18e0236dcd6f9ae44407be7b6a011","tarball":"https://registry.npmjs.org/@90poe/jest-performant-warnings-stats-reporter/-/jest-performant-warnings-stats-reporter-1.0.0.tgz","fileCount":40,"integrity":"sha512-IZ/ahdxPhr6VZLhLOl4lVvchDDg2VeILh6Gs4lxluR67MUJ5GGRoZy3H42XuDNFMf5MlNVMossBaB5Ji+9p/ZA==","signatures":[{"sig":"MEQCIBBZHyh+lYwpM+NvOCh4hZZZBrH7B8kHuykc0liD5VajAiAD+3QecW3eaxOODRFI2CTZMkCt3DnLduRwkV8GEsK7dw==","keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA"}],"unpackedSize":364549,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.13\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJhuwslCRA9TVsSAnZWagAAfVkP+wUmT3DeboE3A2ygGzKA\nnmiBLaAfbv5X9i08zEp3GKmCRek0It6HxjxO6dF54SioxmphP2FAMUYWY4j+\n1KZNyzJCvJrc1S1/AT/GUP1Pu4RnioR22gOFzEEh+FMp7vIZk0X3kX+eLO0k\ndFrp9IGLWSCZ1TtPR/+Wc/pBgsU9mXMaOZPqsThVV/0YkHrsOD2iws3OJ9wk\nPaIRD7hTIdD9jFlPFaoryCsmrs8FM0oRvMXQranAOQdNiflXRWEoV6swFhQN\niDHsTJRQxYPpth+tSP8j8usuFpkdj632OebS7KTpCZuNhpyuSejXIVp+2SF+\nqXTaw84eBGbDsLqEpjLmP3AHuEp5wte+xruMF5DwMDP+fliWgefFn6dqOzuv\nt/PlCIWnmzD6e3sOUhp8/48noEtjPkfc2nGsSiM2vE44rJRSHp0UBbREdNma\n9WO4DvnIWpwjI84xSNLElj/Mi7mT7J+p2JsZO1zGe6t9uxowSEMQBL+ql8s1\nxdokc+3fx7SRVKJ+GwRBQ1NJmfzKc14N4/kDUC9W38MPOmU3S6w+NTljNdw9\n1fdsLv52M4XTSZsEeD5A46VrZ05zP9kw7nx4CcpT/h+PxGET3S2YRipo9qEZ\nUISk00YCLm507chNwJNIABXVF0PxS83jan8mYJiobcC2sO3tCOWZdoYAAOY3\nWX5B\r\n=w7bm\r\n-----END PGP SIGNATURE-----\r\n"},"main":"dist/reporter.js","types":"dist/reporter.d.ts","gitHead":"19cd0637e5485fae7ff57e58f6dceefaf924b430","scripts":{"lint":"eslint . --ext .ts src","test":"jest --collect-coverage","build":"tsc -p tsconfig.prod.json","clean":"rimraf dist && rimraf coverage","prepare":"yarn build","lint:fix":"eslint . --ext .ts src --fix","prebuild":"yarn clean && yarn validate","validate":"yarn lint && yarn test && yarn type-check","test:watch":"jest --watch","type-check":"tsc --noEmit","type-check:watch":"tsc --watch"},"_npmUser":{"name":"volomar","email":"vl.martyniuk@gmail.com"},"repository":{"url":"git+https://github.com/90poe/jest-performant-warnings-stats-reporter.git","type":"git"},"_npmVersion":"6.14.12","description":"A flexible jest reporter that provides ability to show statistics of warnings and group them","directories":{},"_nodeVersion":"14.16.1","dependencies":{"chalk":"^4.1.2","table":"^6.7.1","@jest/types":"^27.0.6","@jest/console":"^27.0.6","@jest/reporters":"^27.0.6","@jest/test-result":"^27.0.6"},"_hasShrinkwrap":false,"devDependencies":{"jest":"^27.0.6","husky":"^7.0.1","eslint":"^7.32.0","rimraf":"^3.0.2","prettier":"^2.3.2","babel-jest":"^27.0.6","typescript":"^4.3.5","@babel/core":"^7.14.8","@types/jest":"^26.0.24","@commitlint/cli":"^13.1.0","@babel/preset-env":"^7.14.9","eslint-plugin-jest":"^24.4.0","eslint-plugin-import":"^2.24.2","eslint-config-prettier":"^8.3.0","eslint-plugin-prettier":"^3.4.0","@babel/preset-typescript":"^7.14.5","@typescript-eslint/parser":"^4.28.5","eslint-plugin-jest-formatting":"^3.0.0","@commitlint/config-conventional":"^13.1.0","eslint-config-airbnb-typescript":"^12.3.1","@typescript-eslint/eslint-plugin":"^4.28.5","eslint-plugin-simple-import-sort":"^7.0.0"},"_npmOperationalInternal":{"tmp":"tmp/jest-performant-warnings-stats-reporter_1.0.0_1634291061656_0.5300976094388188","host":"s3://npm-registry-packages"}}},"time":{"created":"2021-10-15T09:44:21.602Z","modified":"2026-01-05T17:32:52.832Z","1.0.0":"2021-10-15T09:44:21.894Z"},"bugs":{"url":"https://github.com/90poe/jest-performant-warnings-stats-reporter/issues"},"author":{"name":"90poe"},"license":"MIT","homepage":"https://github.com/90poe/jest-performant-warnings-stats-reporter#readme","keywords":["jest","reporter","90poe","jest-reporter","performant","slow-tests"],"repository":{"url":"git+https://github.com/90poe/jest-performant-warnings-stats-reporter.git","type":"git"},"description":"A flexible jest reporter that provides ability to show statistics of warnings and group them","maintainers":[{"email":"cloud@90poe.io","name":"paulanton"},{"email":"samuel.lopez@90poe.io","name":"slopez90poe"},{"email":"gary.lloyd@90poe.io","name":"garylloyd"},{"email":"mosconfabrizio@gmail.com","name":"fabmos"},{"email":"about.wilde@gmail.com","name":"andrew.wilde"},{"email":"Simon.Truss@90poe.io","name":"simont90poe"},{"email":"anasim669@gmail.com","name":"annmedvid"},{"email":"dmytro.gorelik@gmail.com","name":"dhorelik"},{"email":"daria.gorchylina@gmail.com","name":"madelgeek"},{"email":"anatolii.omelchenko@90poe.io","name":"anatolii.omelchenko"}],"readme":"# @90poe/jest-performant-warnings-stats-reporter\n\nThis is a custom jest reporter that recursively collects all warnings while tests run and notifying user _afterwards_ improving performance.\n\n## Motivation\n\nWe had problems with:\n\n1. Slow tests run on CI even with silent mode\n1. When running tests locally noise in the terminal slows tests enormously\n\n## List of superpowers\n\n- more performant than default one (check [benchmark](#benchmarks))\n- can provide statistics on warnings for every test suite (see [example](#showwarningsummary-true))\n- can show slowest tests (see [example](#showslowest-true))\n\n## Installation\n\n```shell\nyarn add @90poe/jest-performant-warnings-stats-reporter --dev\n```\n\nor\n\n```shell\nnpm install @90poe/jest-performant-warnings-stats-reporter --save-dev\n```\n\n## Usage\n\nIn your jest config add the following entry:\n\n```javascript\n{\n  reporters: [\n        [\n            '@90poe/jest-performant-warnings-stats-reporter',\n            {\n                showSlowest: false,\n                maxSlowTests: 5,\n                warnOnSlowerThan: 1000,\n                showWarningSummary: false,\n                warningsConfig: [\n                    {\n                        name: 'act(...) warnings',\n                        regex: /act(...)/im,\n                    },\n                    {\n                        name: 'React Key Issues',\n                        regex: /Encountered two children with the same key/im,\n                    },\n                    // ...\n                ],\n            },\n        ],\n    ],\n}\n```\n\n## Configuration\n\n`@90poe/jest-performant-warnings-stats-reporter` configuration is based on [Jest](https://facebook.github.io/jest/docs/en/configuration.html), available options are shown below.\n\n|       Option       | Description                                                                                                                                                                                            |                    type                     | Default value |\n| :----------------: | ------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------ | :-----------------------------------------: | :-----------: |\n|    showSlowest     | `true / false` flag whether to show slowest tests or not                                                                                                                                               |                  `boolean`                  |    `false`    |\n|    maxSlowTests    | quantity of slowest tests to show, dependant on `showSlowest` flag                                                                                                                                     |                  `number`                   |      `5`      |\n|  warnOnSlowerThan  | a limit in milliseconds, used to identify slow tests                                                                                                                                                   |                  `number`                   |     `400`     |\n| showWarningSummary | `true / false` flag whether to show detailed information on warnings                                                                                                                                   |                  `boolean`                  |    `false`    |\n|   warningsConfig   | an `array` of objects with `name` and `regexp` props, where `name` is title for a warning and `regexp` is regular expression used to match the console warning. Dependant on `showWarningSummary` flag | Array<{ name: `string`, regexp: `RegExp` }> |      []       |\n\n## Sample of output for different configurations\n\n### showSlowest: true\n\n<figure>\n    <img src=\"./examples/showSlowest_true.png\" width=\"650\" alt=\"Sample of output if showSlowest=true\">\n</figure>\n\n### showWarningSummary: false\n\n<figure>\n    <img src=\"./examples/showWarningSummary_false.png\" width=\"450\" alt=\"Sample of output if showWarningSummary=false\">\n</figure>\n\n### showWarningSummary: true\n\n<figure>\n    <img src=\"./examples/showWarningSummary_true.png\" width=\"450\" alt=\"Sample of output if showWarningSummary=true\">\n</figure>\n\n## Benchmarks\n\nUsing [hyperfine](https://github.com/sharkdp/hyperfine) for running 130 test suites in real world project, we can see advantage in performance comparing with:\n\n- default reporter (up to 20% improvement possible, varies by the number of warnings that exist)\n- default reporter with silent mode on (up to 5% improvement)\n\n### default jest reporter\n\n<figure>\n    <img src=\"./examples/defaultReporter.png\" alt=\"Sample of benchmark for default jest reporter\">\n</figure>\n\n### default jest reporter with silent mode on\n\n<figure>\n    <img src=\"./examples/defaultReporter_silent.png\" alt=\"Sample of benchmark for default jest reporter with silent mode on\">\n</figure>\n\n### @90poe/jest-performant-warnings-stats-reporter\n\n<figure>\n    <img src=\"./examples/jest-performant-warnings-stats-reporter.png\" alt=\"Sample of benchmark for @90poe/jest-performant-warnings-stats-reporter\">\n</figure>\n\n## Contribution\n\n[Document](ISSUE_TEMPLATE.md)\n\n## Code of conduct\n\n[Document](CODE_OF_CONDUCT.md)\n\n## Licence\n\n[MIT](LICENSE.md)\n","readmeFilename":"README.md"}