npm package discovery and stats viewer.

Discover Tips

  • General search

    [free text search, go nuts!]

  • Package details

    pkg:[package-name]

  • User packages

    @[username]

Sponsor

Optimize Toolset

I’ve always been into building performant and accessible sites, but lately I’ve been taking it extremely seriously. So much so that I’ve been building a tool to help me optimize and monitor the sites that I build to make sure that I’m making an attempt to offer the best experience to those who visit them. If you’re into performant, accessible and SEO friendly sites, you might like it too! You can check it out at Optimize Toolset.

About

Hi, 👋, I’m Ryan Hefner  and I built this site for me, and you! The goal of this site was to provide an easy way for me to check the stats on my npm packages, both for prioritizing issues and updates, and to give me a little kick in the pants to keep up on stuff.

As I was building it, I realized that I was actually using the tool to build the tool, and figured I might as well put this out there and hopefully others will find it to be a fast and useful way to search and browse npm packages as I have.

If you’re interested in other things I’m working on, follow me on Twitter or check out the open source projects I’ve been publishing on GitHub.

I am also working on a Twitter bot for this site to tweet the most popular, newest, random packages from npm. Please follow that account now and it will start sending out packages soon–ish.

Open Software & Tools

This site wouldn’t be possible without the immense generosity and tireless efforts from the people who make contributions to the world and share their work via open source initiatives. Thank you 🙏

© 2024 – Pkg Stats / Ryan Hefner

cy-report-setup-helper

v1.3.4

Published

Setup script that helps users of Cypress.io automatically set up their folder/project structure so that their tests generate a finished Mochawesome report. If the cloud foundry flag is set to true, then the appropiate files will be public for them to go b

Downloads

15

Readme

What is this?

cy-report-setup-helper is a setup script that helps users of Cypress.io automatically set up their folder/project structure so that their tests generate a finished Mochawesome report. If the cloud foundry flag is set to true, then the appropiate files will be public for them to go back and view teir reports statically via an integration folder.

Installation

npm i cy-report-setup-helper --save-dev

Then in the command line run..

npx cy-helper-generate --output-dir=<desired directory> --cloud-foundry=<true/false>

After running this command run npm install to install the added dependecies..

npm install

This should...

  • add the needed devDependencies npm packages for mocha, mochawesome, mochawesome-report-generator, npm-run-all, and directory-tree.
  • set up the scripts needed for mocha report generation and placement
  • add the cypress settings for the mocha reporter and output videos/screenshots folders.

Then add the script test:create-reports to your build script or test run by calling npm run test:create-reports.

Extra Info

by default, the --output-dir flag will create 'integration/' folder at the top level of your project.

by default, the --cloud-foundry flag is set to false. If set to true, cy-report-setup-helper will create or add the needed manifest.yml information for the integration report directory. It will also create the require staticFile and nginx configuration to set the mochawesome report html and cypress videos/screenshots to public for CORS requests after uploading to cloud foundry.

by default the test:create-reports script assumes that a start script exists and is set up for a live developement server which will run the UI code. This can be changed to fit your needs by altering the test:cy script in your package.json.

devDependencies added to your package.json

{
    "cypress":"^3.8.3"
    "mocha": "^5.2.0",
    "mochawesome": "^4.1.0",
    "mochawesome-merge": "^2.0.1",
    "mochawesome-report-generator": "^4.1.0",
    "npm-run-all": "^4.1.5",
    "directory-tree": "^2.2.4",
    "yargs": "^15.1.0",
    "json-beautify": "^1.1.1"
}

scripts added to your package.json

{
    "cleanup:all": "run-p cleanup:reports cleanup:evidence",
    "cleanup:reports": "rm -fr <output-dir>/integration/public/report* && rm -fr <output-dir>/integration/report*",
    "cleanup:evidence": "rm -fr <output-dir>/integration/public/videos* && rm -fr <output-dir>/integration/public/screenshots*",
    "merge_reports": "mochawesome-merge --reportDir=<output-dir>/integration/reports/mocha > <output-dir>/integration/public/report.json",
    "generate_html_report": "marge <output-dir>/integration/public/report.json -f report -o <output-dir>/integration/public/",
    "test:cy": "run-p --race --silent start test-no-exit",
    "cy:run": "cypress run",
    "test-no-exit": "npm run cy:run --force" 
    "test:create-reports": "run-s cleanup:all test:cy merge_reports generate_html_report create-tree",
    "create-tree": "node <output-dir>/integration/cy-report-tree-generator.js --path=<output-dir>/"
}