{"_id":"@carits-qa/jest-html-reporters","_rev":"3-fc589e2e16735e22372ed495511c66ac","name":"@carits-qa/jest-html-reporters","dist-tags":{"latest":"2.0.4"},"versions":{"2.0.2":{"name":"@carits-qa/jest-html-reporters","version":"2.0.2","description":"Jest test results processor for generating a summary in HTML","main":"index.js","scripts":{"dev":"webpack-dev-server --config=webpack.development.config.js","build":"webpack --progress","start":"npm run dev","test":"jest"},"keywords":["jest","html","reporter","report","plugin"],"author":{"name":"Hazyzh"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/aruiz-caritsqa/jest-html-reporters.git"},"bugs":{"url":"https://github.com/aruiz-caritsqa/jest-html-reporters/issues"},"homepage":"https://github.com/aruiz-caritsqa/jest-html-reporters#readme","devDependencies":{"@babel/cli":"^7.0.0","@babel/core":"^7.0.0","@babel/plugin-proposal-class-properties":"^7.0.0","@babel/plugin-transform-runtime":"^7.0.0","@babel/preset-env":"^7.0.0","@babel/preset-react":"^7.0.0","@babel/preset-stage-0":"^7.0.0","@babel/runtime":"^7.0.0","@svgr/webpack":"^2.3.0","ansi-to-html":"^0.6.6","antd":"^4.3.1","babel-core":"^7.0.0-bridge.0","babel-eslint":"^9.0.0","babel-jest":"^23.4.2","babel-loader":"^8.0.0","babel-plugin-import-separation":"^1.0.0","clean-webpack-plugin":"^0.1.19","copy-to-clipboard":"^3.0.8","css-loader":"^1.0.0","enzyme":"^3.9.0","enzyme-adapter-react-16":"^1.10.0","escape-html":"^1.0.3","eslint":"^5.4.0","eslint-config-standard":"^12.0.0","eslint-config-standard-jsx":"^6.0.2","eslint-friendly-formatter":"^4.0.1","eslint-loader":"^2.1.0","eslint-plugin-html":"^4.0.5","eslint-plugin-import":"^2.14.0","eslint-plugin-node":"^7.0.1","eslint-plugin-promise":"^4.0.0","eslint-plugin-react":"^7.11.1","eslint-plugin-standard":"^4.0.0","extract-text-webpack-plugin":"^3.0.2","friendly-errors-webpack-plugin":"^1.7.0","html-webpack-inline-source-plugin":"^0.0.10","html-webpack-plugin":"^3.2.0","jest":"^26.0.1","jest-enzyme":"^7.0.2","jump.js":"^1.0.2","less":"^3.8.1","less-loader":"^4.1.0","moment":"^2.22.2","randomcolor":"^0.5.3","react":"^16.13.1","react-dom":"^16.13.1","react-hot-loader":"^4.3.5","react-router-dom":"^4.3.1","recharts":"^1.2.0","regenerator-runtime":"^0.12.1","style-loader":"^0.23.0","uglifyjs-webpack-plugin":"^2.0.1","url-loader":"^1.1.1","webpack":"^4.17.1","webpack-bundle-analyzer":"^3.0.3","webpack-cli":"^3.1.0","webpack-dev-server":"^3.1.7","@ant-design/icons":"^4.0.6"},"dependencies":{"fs-extra":"^9.0.1"},"gitHead":"0f9ea3a8794e8577169b9bf7ac25c6bb2e14a8d6","_id":"@carits-qa/jest-html-reporters@2.0.2","_nodeVersion":"14.5.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-cVAlM/8AZjQDeQ5RlhQqLV4u4O2WgV7zMijqS5qhqq5ywiur/5JGmonXmvbLXKx8Bz5qWS0nltiJIKWq0fHvWw==","shasum":"a8e7e5594ba706c49a4f45fc5017cfc18af1291b","tarball":"https://registry.npmjs.org/@carits-qa/jest-html-reporters/-/jest-html-reporters-2.0.2.tgz","fileCount":7,"unpackedSize":1877684,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfDr/uCRA9TVsSAnZWagAAtlsP/jpSzIGyhhXSm4XNQO1Z\n5NfvVl/R+Q8VfFqFa59CkjMZJiCtPNESBE6e95WnOLxNwbWvCjunaYwH9GDq\n/ca7lMxoA6d8D7VT4zvagl2YczInkwfJ7OjzsoCaQlYDBxoWjtLDpo5AasT4\nCSNBqSCWwNvlAvyQkT18oid1QoLAUC0PhumkVC+vV87Dhs7vGWAXq562k9Vg\ndEdk3U0D0c94jfLKsawUGMZODLV96bdo2Wa58cKTIFhWVnXWursFHBHpxRoL\nSkZZ+6QBwt2mDIcSwFX5hxViJ1/4XO5GVOffMS0e4f7IWpJM4IqhvCh+hlqd\nvRIzr5gZl0LOhIIDyCNHzennQqRPr9c0ERVjLHah0vg9jswQ6S5DZTBIw9xs\nijUDE0w9zssBJjWtFo1SmlP5xSuI11ia1Iq/+kt4CTNbnfjVph4Bo1q3/SLN\nUcFH9WafdLXPCIV0XNxgVMCCLbD+6H/UxXYFl7OYWIFVgeC6+GJ8B3MvOKsU\nuOD+19kmFEcgJ5oykWFJBtEivoByIn9Tcyu5Sy596c2Gdq1yZ6vKiJalEGD9\neUX7dEV+GgBDDlGInnF2SJXteoRmDh3dkPeBrYANASkJcDrQziQzZ1bevgP8\nzzM7IpOyN6rqw6zcsVHPf1r6KKPwGW7SSkhAQnqQnk17pGbYe7BcL5bx6WWh\n4VCb\r\n=S54p\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCICDSneKgB8Vz5JNROjp6xfcM+/ICR9uwBMyBcLfL3bbRAiEA5FcySEw+48z//+k6dZ3ls7zVcjO/8QjVwtduI56Ho/A="}]},"maintainers":[{"name":"caritsqa","email":"caritsqa@gmail.com"}],"_npmUser":{"name":"caritsqa","email":"caritsqa@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/jest-html-reporters_2.0.2_1594802157492_0.994421902564369"},"_hasShrinkwrap":false},"2.0.3":{"name":"@carits-qa/jest-html-reporters","version":"2.0.3","description":"Jest test results processor for generating a summary in HTML","main":"index.js","scripts":{"dev":"webpack-dev-server --config=webpack.development.config.js","build":"webpack --progress","start":"npm run dev","test":"jest"},"keywords":["jest","html","reporter","report","plugin"],"author":{"name":"Hazyzh"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/aruiz-caritsqa/jest-html-reporters.git"},"bugs":{"url":"https://github.com/aruiz-caritsqa/jest-html-reporters/issues"},"homepage":"https://github.com/aruiz-caritsqa/jest-html-reporters#readme","devDependencies":{"@babel/cli":"^7.0.0","@babel/core":"^7.0.0","@babel/plugin-proposal-class-properties":"^7.0.0","@babel/plugin-transform-runtime":"^7.0.0","@babel/preset-env":"^7.0.0","@babel/preset-react":"^7.0.0","@babel/preset-stage-0":"^7.0.0","@babel/runtime":"^7.0.0","@svgr/webpack":"^2.3.0","ansi-to-html":"^0.6.6","antd":"^4.3.1","babel-core":"^7.0.0-bridge.0","babel-eslint":"^9.0.0","babel-jest":"^23.4.2","babel-loader":"^8.0.0","babel-plugin-import-separation":"^1.0.0","clean-webpack-plugin":"^0.1.19","copy-to-clipboard":"^3.0.8","css-loader":"^1.0.0","enzyme":"^3.9.0","enzyme-adapter-react-16":"^1.10.0","escape-html":"^1.0.3","eslint":"^5.4.0","eslint-config-standard":"^12.0.0","eslint-config-standard-jsx":"^6.0.2","eslint-friendly-formatter":"^4.0.1","eslint-loader":"^2.1.0","eslint-plugin-html":"^4.0.5","eslint-plugin-import":"^2.14.0","eslint-plugin-node":"^7.0.1","eslint-plugin-promise":"^4.0.0","eslint-plugin-react":"^7.11.1","eslint-plugin-standard":"^4.0.0","extract-text-webpack-plugin":"^3.0.2","friendly-errors-webpack-plugin":"^1.7.0","html-webpack-inline-source-plugin":"^0.0.10","html-webpack-plugin":"^3.2.0","jest":"^26.0.1","jest-enzyme":"^7.0.2","jump.js":"^1.0.2","less":"^3.8.1","less-loader":"^4.1.0","moment":"^2.22.2","randomcolor":"^0.5.3","react":"^16.13.1","react-dom":"^16.13.1","react-hot-loader":"^4.3.5","react-router-dom":"^4.3.1","recharts":"^1.2.0","regenerator-runtime":"^0.12.1","style-loader":"^0.23.0","uglifyjs-webpack-plugin":"^2.0.1","url-loader":"^1.1.1","webpack":"^4.17.1","webpack-bundle-analyzer":"^3.0.3","webpack-cli":"^3.1.0","webpack-dev-server":"^3.1.7","@ant-design/icons":"^4.0.6"},"dependencies":{"fs-extra":"^9.0.1"},"gitHead":"57498ebeedf3cda3b9912f561fdabf0e2968f59c","_id":"@carits-qa/jest-html-reporters@2.0.3","_nodeVersion":"14.5.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-4JiJbMjhE9bmHYrRYB85okkhI24vI4OfVEWDEyoHWnXvepyrLaPnA2+eJNGaX3s6yPpdiBFyCNnZAz/xbCFfNQ==","shasum":"457738e30d89d098ca7e49f0295728cc542380fd","tarball":"https://registry.npmjs.org/@carits-qa/jest-html-reporters/-/jest-html-reporters-2.0.3.tgz","fileCount":7,"unpackedSize":1878062,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfDsazCRA9TVsSAnZWagAAJBkP/2AmA91a2+Avktq7lUrx\nzMxNTMzEOcSdtwvQx1HTL1FN4x7tokWYMJrm7I5rHOzgSxYYnPT+5LDuPlUj\nKnqeNIaBEzDlIraz0kkklSjPiLXH3GCb2EIlinvIvi7o9cVFpsCo+Y/zWQQl\nmvOFcq2yifiLtIbDX7ILe2wFgELQ+5fZLWjzxbpyoBUtnPhq8U3I9gX51U8a\n+cmRUqKYuW6Xatcld0R+1dwlsJUb/uHMqq7ARtBNM3KWR44UXyUNSf8H+9Gv\n/UqxFmjYhJoL9XvoRjnhXiszgfgNtcV9BS2gK33BCmZzHcEedbh8fv3upygd\nilMDy/cq+I1CFfv64qre0td1ovWfPilaVrlsCtuJ+k/A84k5spko60cD5hsA\nHCVT4h/8blqeXFjtzgpWFufj3gFpfm7hNkhGve64qvcn5EXZc/mTZ3YHgSeg\ngBW4akXd5P9+air4IzNWhiQPOWOc2GiZQ9d8rmjAKcA7ZfWshxgjxKTd7zTH\n4+JNanbYGe0LLvyY7g+gNHguEl5VCKH2NYyY6mNvmZ1P926XOysf6w3tnYkE\nYurWtSF67bh3JAOo1BviqrUZxiLJdOqWV77nG9EJyMtz98xOYb0KHDr2tnrY\ngkVVqt+lCgHcHOBY2IcCxD5qRb6Y1bAvUtOXvRIVQCudeFhLn6Nxd7OiaHox\nu9cH\r\n=HkcM\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIDqGTI0EezKe2IoWjam9VBHRjpM9Dq/MtudAdv7wdknsAiEA4wS4wrxeAZ8+hhmQnYli0vcLaShgMKLBtVu4MtXRRoY="}]},"maintainers":[{"name":"caritsqa","email":"caritsqa@gmail.com"}],"_npmUser":{"name":"caritsqa","email":"caritsqa@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/jest-html-reporters_2.0.3_1594803891072_0.8511181248205808"},"_hasShrinkwrap":false},"2.0.4":{"name":"@carits-qa/jest-html-reporters","version":"2.0.4","description":"Jest test results processor for generating a summary in HTML","main":"index.js","scripts":{"dev":"webpack-dev-server --config=webpack.development.config.js","build":"webpack --progress","start":"npm run dev","test":"jest"},"keywords":["jest","html","reporter","report","plugin"],"author":{"name":"Hazyzh"},"license":"MIT","repository":{"type":"git","url":"git+https://github.com/aruiz-caritsqa/jest-html-reporters.git"},"bugs":{"url":"https://github.com/aruiz-caritsqa/jest-html-reporters/issues"},"homepage":"https://github.com/aruiz-caritsqa/jest-html-reporters#readme","devDependencies":{"@babel/cli":"^7.0.0","@babel/core":"^7.0.0","@babel/plugin-proposal-class-properties":"^7.0.0","@babel/plugin-transform-runtime":"^7.0.0","@babel/preset-env":"^7.0.0","@babel/preset-react":"^7.0.0","@babel/preset-stage-0":"^7.0.0","@babel/runtime":"^7.0.0","@svgr/webpack":"^2.3.0","ansi-to-html":"^0.6.6","antd":"^4.3.1","babel-core":"^7.0.0-bridge.0","babel-eslint":"^9.0.0","babel-jest":"^23.4.2","babel-loader":"^8.0.0","babel-plugin-import-separation":"^1.0.0","clean-webpack-plugin":"^0.1.19","copy-to-clipboard":"^3.0.8","css-loader":"^1.0.0","enzyme":"^3.9.0","enzyme-adapter-react-16":"^1.10.0","escape-html":"^1.0.3","eslint":"^5.4.0","eslint-config-standard":"^12.0.0","eslint-config-standard-jsx":"^6.0.2","eslint-friendly-formatter":"^4.0.1","eslint-loader":"^2.1.0","eslint-plugin-html":"^4.0.5","eslint-plugin-import":"^2.14.0","eslint-plugin-node":"^7.0.1","eslint-plugin-promise":"^4.0.0","eslint-plugin-react":"^7.11.1","eslint-plugin-standard":"^4.0.0","extract-text-webpack-plugin":"^3.0.2","friendly-errors-webpack-plugin":"^1.7.0","html-webpack-inline-source-plugin":"^0.0.10","html-webpack-plugin":"^3.2.0","jest":"^26.0.1","jest-enzyme":"^7.0.2","jump.js":"^1.0.2","less":"^3.8.1","less-loader":"^4.1.0","moment":"^2.22.2","randomcolor":"^0.5.3","react":"^16.13.1","react-dom":"^16.13.1","react-hot-loader":"^4.3.5","react-router-dom":"^4.3.1","recharts":"^1.2.0","regenerator-runtime":"^0.12.1","style-loader":"^0.23.0","uglifyjs-webpack-plugin":"^2.0.1","url-loader":"^1.1.1","webpack":"^4.17.1","webpack-bundle-analyzer":"^3.0.3","webpack-cli":"^3.1.0","webpack-dev-server":"^3.1.7","@ant-design/icons":"^4.0.6"},"dependencies":{"fs-extra":"^9.0.1"},"gitHead":"c0d92faac711395462de0744bf1fc24cdc5c098c","_id":"@carits-qa/jest-html-reporters@2.0.4","_nodeVersion":"14.5.0","_npmVersion":"6.14.5","dist":{"integrity":"sha512-VUtZN+EI5fMo5MOeLik2bL1QH5SUwcw/NNRp/dQYxi0B0JDZg87rzPpqIkjtsrmNoLNWlbRqUNLQz+iPaF5mkQ==","shasum":"380bd7e6e721e7b8ffd1bd995ebe4221e441f3f5","tarball":"https://registry.npmjs.org/@carits-qa/jest-html-reporters/-/jest-html-reporters-2.0.4.tgz","fileCount":7,"unpackedSize":1878076,"npm-signature":"-----BEGIN PGP SIGNATURE-----\r\nVersion: OpenPGP.js v3.0.4\r\nComment: https://openpgpjs.org\r\n\r\nwsFcBAEBCAAQBQJfDtZWCRA9TVsSAnZWagAA67AQAJ8WCXSEBNUcMaHBmYus\ntQ+vMVYCEFqw1pQhiR7L/4dKU3K1MTYJDmWfzwNghdkwIoS3lMImnR4Z6ooL\n7n1V9oT/OsHZDxMzp64zsF106Ig1EDGvr2gj5Pj3FgP2WJ5CZxf1KYS2vjWl\nQ8Jqg38Ok+tFxScYSZH8Bisvij+ajV1oO1LAQ7zilrVqD82Y7MiUUm0nnlUo\n6TlyH6LWhvhpM9qeh/DPyMa+eSpPm+R6IHRj3lQe1zISS1m24AghQKDwdymz\nXjALj7Q9ezKnElz4juIu96fzePISSfIQ+PnjtBK9UkZZvBRwaTztdrDtFH16\ni2pabZXcZfUOnaYsG980/xuRNkoSMvUVyj+izV/KvCgrCNRwzmvqu0orzA6B\nprVzzFzIN6FRx1mTVRAlouAMRvHZdX3nOkcRPlmLZlF+NdmX1ciFOAHRiU6a\n6xaD1DpDOkZV1OAe10+yStY7IDrvDNND0Zm3dN7+6xVXzEePDI/oxjCKx+Td\nj1rF9nNcebWQyY9WrqfYzp+loiJhMqbF0ldCQDiNYn7ofBooptSHUYWqAYaI\nWlqv8n/8oD/98b7RTtwjdI1OvgN7NyJFHPic1X4G/lGRptLppoaC1xuFqpmK\nziuaoDLjuJFKXxB8kcWY4XE3HMy9MOAFNOz/HZ1XzXpigoJMdT+yCv/Y/UCi\nhol8\r\n=/Lm1\r\n-----END PGP SIGNATURE-----\r\n","signatures":[{"keyid":"SHA256:jl3bwswu80PjjokCgh0o2w5c2U4LhQAE57gj9cz1kzA","sig":"MEUCIQCaR3Rcdb5BknYjKMhRDjaZDBoLRNU1ZAjoKFH3aDo5KwIgbR2h68VGIM5eB1w54vAvK98jN0qRjJGpEZD5MaxiJ0Q="}]},"maintainers":[{"name":"caritsqa","email":"caritsqa@gmail.com"}],"_npmUser":{"name":"caritsqa","email":"caritsqa@gmail.com"},"directories":{},"_npmOperationalInternal":{"host":"s3://npm-registry-packages","tmp":"tmp/jest-html-reporters_2.0.4_1594807894275_0.7613005311990961"},"_hasShrinkwrap":false}},"time":{"created":"2020-07-15T08:35:57.236Z","2.0.2":"2020-07-15T08:35:57.781Z","modified":"2022-04-04T21:56:09.174Z","2.0.3":"2020-07-15T09:04:51.333Z","2.0.4":"2020-07-15T10:11:34.490Z"},"maintainers":[{"name":"caritsqa","email":"caritsqa@gmail.com"}],"description":"Jest test results processor for generating a summary in HTML","homepage":"https://github.com/aruiz-caritsqa/jest-html-reporters#readme","keywords":["jest","html","reporter","report","plugin"],"repository":{"type":"git","url":"git+https://github.com/aruiz-caritsqa/jest-html-reporters.git"},"author":{"name":"Hazyzh"},"bugs":{"url":"https://github.com/aruiz-caritsqa/jest-html-reporters/issues"},"license":"MIT","readme":"### Jest reporter\n\n[![npm](https://img.shields.io/npm/v/jest-html-reporters.svg)](https://www.npmjs.com/package/jest-html-reporters)\n[![NPM downloads](http://img.shields.io/npm/dm/jest-html-reporters.svg)](http://npmjs.com/jest-html-reporters)\n[![license](https://img.shields.io/npm/l/jest-html-reporters.svg)](https://www.npmjs.com/package/jest-html-reporters)\n\nJest test results processor for generating a summary in HTML\n\n![example picture](./show.gif)\n\n### Installation\n\n---\n\n```shell\n  npm install @carits-qa/jest-html-reporters --save-dev\n```\n\n### Usage\n\n---\n\nConfigure Jest to process the test results by adding the following entry to the Jest config (jest.config.json):\n\n```json\n\"jest\": {\n  ...,\n  \"reporters\": [\n    \"default\",\n    \"@carits-qa/jest-html-reporters\"\n  ],\n  ...\n}\n\n```\n\nAs you run Jest from within the terminal, a file called `jest_html_reporters.html` will be created within your root folder containing information about your tests.\n\n### Available Options\n\nThe options below are specific to the reporter.\n\n| Option Name   | Type    | Default                  | Description                                                                                                                                                                                                                                                                                          |\n| :------------ | :------ | :----------------------- | :--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------- |\n| `publicPath`  | string  | ''                       | specify the base path                                                                                                                                                                                                                                                                                |\n| `filename`    | string  | jest_html_reporters.html | Filename of saved report <br> _Applies to the generated html_                                                                                                                                                                                                                                        |\n| `expand`      | Boolean | false                    | specify whether default expand all data                                                                                                                                                                                                                                                              |\n| `pageTitle`   | string  | Report                   | specify header and page title                                                                                                                                                                                                                                                                        |\n| `logoImgPath` | string  | undefined                | specify path of the image that will be displayed to the right of page title                                                                                                                                                                                                                          |\n| `hideIcon`    | Boolean | false                    | hide default icon                                                                                                                                                                                                                                                                                    |\n| `customInfos` | array   | undefined                | show some custom data info in the report, example value `[ {title: 'test1', value: 'test1'}, {title: 'test2', value: 'test2'}]`, you can also set value to a environment variable **JEST_HTML_REPORTERS_CUSTOM_INFOS**, see detail in [#32](https://github.com/Hazyzh/jest-html-reporters/issues/32) |\n\n#### example add config options\n\n```json\n...,\n\"reporters\": [\n  \"default\",\n  [\"@carits-qa/jest-html-reporters\", {\n    \"publicPath\": \"./html-report\",\n    \"filename\": \"report.html\",\n    \"expand\": true\n  }]\n]\n```\n\n---\n\n### 2.x updates\n\n- Collapsable Test Groups\n\nThis feature regrading to [#37](https://github.com/Hazyzh/jest-html-reporters/issues/37), if a test file has many test cases, here will show a Merge Data checkbox on the expanded table. You can check it to merge data and set the merge level to control how to combine those data.\n\nFor Example\n![merge data example](https://user-images.githubusercontent.com/21355783/84232424-d2acd000-ab22-11ea-8929-36c90a6c36ee.png)\n\n- Attach screenshot to report\n\nThis feature regrading to [#36](https://github.com/Hazyzh/jest-html-reporters/issues/36), this package will a new method named `addAttach`.\n\n```\n/**\n *\n * @param {Buffer | string} attach\n * @param {string} description of the picture\n */\nconst addAttach = async (attach, description) => { ... }\n```\n\nThere are two params of this method, `description` is easy to understand. The param **`attach`** referring to the image, you can pass a `buffer` or `string`, if it was a buffer the package will help you create a dir named `jest-html-reporters-attach` and save that `buffer` as a `jpg` image in it under the `publicPath`. if you have already saved the image, just pass the image's path as the `attach` param.\nHere is an Example with [puppeteer](https://github.com/puppeteer/puppeteer).\n\n```javascript\n// Example attach with **buffer**\nconst { addAttach } = require('@carits-qa/jest-html-reporters/helper')\nconst puppeteer = require('puppeteer')\n\ndescribe('just examples', () => {\n  test('test buffer', async () => {\n    const browser = await puppeteer.launch()\n    const page = await browser.newPage()\n    await page.goto('https://www.google.com')\n    const data = await page.screenshot()\n    await browser.close()\n    await addAttach(data, 'test google 1')\n\n    expect(1).toBe(1)\n  })\n})\n```\n\n```javascript\n// Example attach with **string**\nconst { addAttach } = require('@carits-qa/jest-html-reporters/helper')\nconst puppeteer = require('puppeteer')\nconst path = require('path')\n\ndescribe('just examples', () => {\n  test('case string', async () => {\n    const browser = await puppeteer.launch()\n    const page = await browser.newPage()\n    const filePath = path.resolve(__dirname, './test.jpg')\n    await page.goto('https://www.google.com')\n    const data = await page.screenshot({path: filePath})\n    await browser.close()\n    await addAttach(filePath, 'test google 2')\n\n    expect(1).toBe(2)\n  })\n})\n```\n\nit will show like this\n![example](./attach-example.jpg)\n\n- Attach a message to the report\n\nAllows you to add a message, log something to the report etc\n\n```\n/**\n *\n * @param {string} message\n */\nconst addMsg = async (message) => { ... }\n```\n\nOnly one parameter is required. If you stringify an object like this `JSON.stringify(object, null, 2)`, the object will be prettified\n\nHere is an Example with [Nightmare](https://www.npmjs.com/package/nightmare).\n\n```javascript\nconst { addAttach, addMsg } = require('@carits-qa/jest-html-reporters/helper')\nconst Nightmare = require('nightmare')\n \ndescribe('Yet another example', () => {\n  test('Both addAttach & addMsg with failure', async () => {\n    const nightmare = Nightmare({ show: true })\n    await addMsg(JSON.stringify({won: 1, too: 2}, null, 2))\n    await nightmare\n      .goto('https://duckduckgo.com')\n    const s1 = await nightmare.screenshot();  \n    await addAttach(s1, 'test duckduckgo 1')\n    await nightmare.end();\n    await addMsg(JSON.stringify(process, null, 2))\n    expect(2).toEqual(1);\n  }, 20000);  \n\n  test('addMsg with success', async () => {\n    await addMsg(JSON.stringify({free: 3, for: 4}, null, 2))\n    expect(2).toEqual(2);\n  });    \n});\n```\n![example](./addMsg-example1.jpg)\n\nMessage still displays without screenshots and with a successful test\n![example](./addMsg-example2.jpg)","readmeFilename":"readme.md"}