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

cypress-explorer

v0.1.0

Published

A simple file explorer that can run multiple specs for Cypress 10.

Downloads

16

Readme

Cypress Explorer

A simple file explorer that can run multiple specs for Cypress 10.

Warning very experimental, relies on internal APIs, hardly tested.

  • Screenshot:

  • Demo:

Installation

  • yarn add cypress-explorer --dev
  • npm install cypress-explorer --dev

Usage

  1. Install the plugin (cypress.config.ts)
import { defineConfig } from 'cypress'
import { startExplorerServer } from 'cypress-explorer/server'

export default defineConfig({
  e2e: {
    async setupNodeEvents (on, config) {
      await startExplorerServer()
    }
  }
})
  1. Install the command (cypress/commands/e2e.ts)
import { registerCypressExplorer } from 'cypress-explorer'

registerCypressExplorer()

How It Works

Warning this plugin uses many hacks, internal Cypress APIs, etc. It's also highly experimental and assumes you are using the default specPattern, which means your E2E specs are in cypress/e2e/**/*.cy.*.

The approach is similar to the one suggested by Gleb Bahmutov in his blog post for a temporary work around to the "Run All Specs" button, which due to technical limitations, was removed from Cypress 10 (until the limitations are solved, and it is returned). It creates a temporary spec, _cypress-explorer.cy.js, and imports all the specs you want to run. It then navigates to the temprary spec and executes them all.

The main difference is Cypress Explorer provides you a simple UI, where you can simply check the specs you want to run. It writes them all to a cypress-explorer.cy.js file, which imports all your specs. So, just select cypress-explorer.cy.js from the sidebar, and you can run all your specs.

Known Issues

Same as "Run All Specs" in Cypress 9:

  • out of memory when running large amount of specs due to snapshots consuming a lot of memory
  • non deterministic (code from other tests can impact each other, since they all run in the same scope)
  • not working for Component Testing (yet, fix soon)
  • does not respect custom specPattern
  • probably not working on Windows (fix soon)
  • probably doesn't handle mix of JS/TS correctly
  • not tested with type: module or native ESM
  • does not support jsx or tsx extensions (fix soon)
  • very ugly UI (PR definitely welcome on this front)
  • likely lots of other bugs, it's a work in progress!

TODO

  • [ ] Support custom specPattern, other configuration
  • [ ] Less ugly UI
  • [ ] Test thoroughly
  • [ ] Keyboard shortcuts for the Explorer UI

Developing

Clone this, install with yarn. Run yarn build:ui --watch in watch mode for the front-end. You need to restart for changes to the server.