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

skipped-tests-finder

v1.1.0

Published

A command-line tool that scans your project or test suites and identifies any skipped tests

Downloads

68

Readme

skipped-tests-finder

Analyses your project or a specific directory for skipped tests

Skipped Tests Finder is a command-line tool that scans your project or test suites and identifies any skipped tests or test suites. It provides a convenient way to keep track of skipped tests and ensure that they are addressed before releasing your application. Skipped Tests Finder works for the majority of test frameworks, including but not limited to Playwright, Puppeteer, Cypress, Robot Framework, Selenium, Katalon Studio, Jest, Mocha, Jasmine, unittest, pytest, RSpec, MiniTest, PHPUnit, JUnit, NUnit, MSTest, Catch2 and GoogleTest.

Note: this tool appears to struggle with scanning very large codebases in their entirety. If you encounter the error message The directory does not exist. Please enter a valid directory path. after running the script to scan your entire codebase, please rerun the tool, this time targeting either your test directory or the src folder specifically. Additionally, it's advisable to run the tool separately on different directories to segregate results for distinct types of test suites within your project. For instance, you might run this script to identify Jest tests located in ./src and Cypress tests in ./cypress/e2e separately.

Features

  • Recursively scans a directory and its subdirectories for test files (.js, .ts, .jsx, .tsx, .coffee, .py, .rb, .php, .java, .cs, .go, .cpp and .groovy files)
  • Identifies skipped tests for many different types of syntaxes, such as it.skip(...), test.skip(...), xtest(...), @unittest.skip("reason"), @pytest.mark.skip(reason="reason"), it "test name" and much more
  • Displays the total number of skipped tests found
  • Outputs a list of skipped tests with their names, file paths, and line numbers
  • Supports outputting the results to a file (skipped_tests.txt) for easier integration with other tools or further processing

Installation

Requirements

  • skipped-tests-finder requires NodeJS 10 (or higher) to be installed

NPM Installation (Recommended)

npm install -g skipped-tests-finder

This will install the tool globally on your system, making it available from any directory.

Manual Installation

  1. Clone this repository:
git clone https://github.com/Sharma-IT/skipped-tests-finder.git
  1. Change into this respository's directory:
cd skipped-tests-finder

For Linux/macOS

  1. To install skipped-tests-finder globally on Linux-based Operating Systems (including macOS), run:
./install.sh

This will make the tool accessible from anywhere by running skipped-tests-finder.

For Windows

  1. To install skipped-tests-finder globally on Windows, run PowerShell as Administrator and execute:
.\install.ps1

This will make the tool accessible from anywhere by running skipped-tests-finder. You may need to restart your terminal for the changes to take effect.

Usage

  1. Install skipped-tests-finder using the instructions above.
  2. From any directory in your terminal, run:
skipped-tests-finder
  1. Upon execution, the script will request the path to your tests directory. You have the option to input the path after initiating the script or beforehand using the -d argument. For example, skipped-tests-finder -d=projects/project_name/cypress/e2e.

  2. Following that, the script will inquire whether you wish to save the results to a text file. Respond with either "y" or "n" as appropriate, "y" will save the results to a text file (skipped_tests.txt) and "n" will print the results in your console. If you choose "y", you'll be prompted to enter the file path where you want the text file to be created. Leaving this blank will create the output in the same directory as the script.

  3. Alternatively, you can bypass this prompt by utilising the following arguments when executing the script:

    • -cli: Display the results directly in your console
    • -txt: Generate a plain text file named skipped_tests.txt in the same directory as your tests
    • -o=<path>: Override the output directory for the text file (optional)
    • -d=<path>: Specify the directory to scan for skipped tests (e.g., skipped-tests-finder -d=projects/project_name/cypress/e2e)
  4. The script will proceed to scan your test directory and its subdirectories to identify skipped tests. Subsequently, it will print the results in the console or write them into the skipped_tests.txt file, depending on your choice.

Note: you can also copy the script manually into your project directory and run the script from the project directory.

Commands

Usage: node skipped-tests-finder [options] -d=[<path>]

Options:

 -d=<path>        Path to the directory to search for skipped tests
 -txt             Output the results to a plain text file
 -cli             Output the results to the terminal
 -o=<path>        Path to the directory for the text output
 -c               Output the text results in the same directory as the script
 -h, --help       Display this help message

Example Output

my-name@my-computers-name my application % node skipped-tests-finder.js -d=.projects/project_1/cypress/e2e -cli

Total skipped tests: 2

Skipped Tests:

- test 1 (cypress/e2e/tests.spec.js:4)
- test 2 (cypress/e2e/tests.spec.js:12)

Contributing

Pull requests are welcomed. For major changes, please open an issue first to discuss what you would like to change.

Contact

Shubham Sharma - My LinkedIn - [email protected].

License

This project is licensed under the GPL 3.0 License - see the LICENSE file for details.