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 🙏

© 2026 – Pkg Stats / Ryan Hefner

@qualestech/coverage-gap-detector

v1.0.0

Published

AI-powered Playwright test coverage gap detector. Crawls your app, analyses your test suite, classifies gaps by test pyramid layer, and generates ready-to-run test templates.

Readme

@qualestech/coverage-gap-detector

AI-powered Playwright test coverage gap detector by Quales Consulting Ltd

Crawls your live web app, analyses your existing Playwright test suite, identifies untested routes, and uses AI to classify each gap by the correct testing layer — generating ready-to-run Playwright and Vitest templates.


What it does

  1. Crawls your app — launches a headless Playwright browser, authenticates, and spiders all navigable routes
  2. Parses your test files — statically analyses your .spec.ts files to extract which routes and interactions are already covered
  3. Diffs the two — finds routes the app has that no test visits
  4. AI classifies each gap — via the Quales API (powered by Claude), determines whether each gap needs an E2E test, a unit/integration test, or can be deprioritised
  5. Generates output — a coverage score, HTML report, JSON data file, and ready-to-run test templates

Output

coverage-reports/
├── coverage-gap-report.html     ← Visual report with filter, score badge, templates
├── coverage-gap-report.json     ← Machine-readable data (feeds other Quales agents)
└── templates/
    ├── wallet-send.spec.ts      ← Playwright E2E template
    ├── send-amount.test.ts      ← Vitest unit template
    └── ...

Installation

npm install --save-dev @qualestech/coverage-gap-detector

Requires Node.js ≥ 18 and Playwright browsers:

npx playwright install chromium

Setup

Generate a starter config file in your project root:

npx coverage-gap-detector --init

This copies gap.config.example.json to gap.config.json in your current directory. Open it and fill in your app's details:

{
  "baseUrl": "https://your-app.example.com",
  "testDir": "./tests",
  "outputDir": "./coverage-reports",
  "licenceKey": "YOUR_QUALES_LICENCE_KEY",
  "auth": {
    "loginUrl": "/login",
    "emailSelector": "#email",
    "passwordSelector": "#password",
    "submitSelector": "[type=submit]",
    "email": "[email protected]",
    "password": "yourpassword"
  },
  "seedRoutes": ["/dashboard", "/settings", "/billing"]
}

Licence keys are issued by Quales Consulting. Contact [email protected]

If your app has a 2FA / OTP step after login

Add these fields under auth — the defaults match a common pattern of six individually-indexed digit inputs:

"auth": {
  "otp": "123456",
  "otpScreenSelector": "[data-testid=\"screen-2fa\"]",
  "otpInputSelectorPattern": "[data-testid=\"otp-input-{i}\"]",
  "otpSubmitSelector": "[data-testid=\"btn-verify-2fa\"]"
}

Omit otp entirely if your app has no 2FA step.

If your app uses button-based navigation (not <a href> links)

Many single-page apps lose their authenticated session on a hard page reload. If your app's nav uses buttons rather than real links, map each route to the data-testid of the button that navigates there:

"navButtonMap": {
  "/dashboard": "nav-dashboard",
  "/settings": "nav-settings"
}

The crawler will click the mapped button instead of doing a full page navigation, preserving the in-memory auth state most SPAs rely on. Routes without a mapped button fall back to a normal page navigation.


Usage

# Run full analysis (crawl + extract + diff + AI classify)
npx coverage-gap-detector --config gap.config.json

# Skip re-crawl and reuse cached routes (faster for re-analysis)
npx coverage-gap-detector --config gap.config.json --no-crawl

Config reference

| Field | Required | Description | |---|---|---| | baseUrl | ✅ | Root URL of the app to crawl | | testDir | ✅ | Path to your Playwright test directory | | outputDir | ✅ | Where to write reports and templates | | licenceKey | ✅ | Quales licence key | | seedRoutes | recommended | Authenticated routes to check for coverage | | auth.loginUrl | — | Login page path (default: /login) | | auth.emailSelector | — | CSS selector for email input | | auth.passwordSelector | — | CSS selector for password input | | auth.submitSelector | — | CSS selector for submit button | | auth.email | — | Test user email | | auth.password | — | Test user password | | auth.otp | — | OTP code, if your app has a 2FA step | | auth.otpScreenSelector | — | Selector for the 2FA screen container | | auth.otpInputSelectorPattern | — | Selector pattern for each digit input, with {i} as the index placeholder | | auth.otpSubmitSelector | — | Selector for the 2FA verify button | | navButtonMap | — | Maps a route to the data-testid of its nav button, for SPAs without <a href> links | | crawlDepth | — | Reserved for future link-following crawl mode |


Test layer classification

| Layer | When assigned | Template format | |---|---|---| | E2E | Auth flows, multi-step journeys, cross-page state | Playwright .spec.ts | | Unit / Integration | Form validation, field rules, data transforms | Vitest .test.ts (Jest-compatible) | | Deprioritise | Static pages, minimal interactions, low-risk content | No template generated |


Part of the Quales QA Agent Suite

| Agent | Purpose | |---|---| | Environment Sentinel | Pre-flight health gate before test runs | | Jira-to-Test-Case | Generates test cases from Jira tickets | | Self-Healing Reporter | Detects and suggests fixes for broken locators | | Coverage Gap Detector | Maps untested routes and generates templates | | Failure Triage Agent | (coming soon) Classifies CI failures by root cause |


Licence

MIT © Quales Consulting Ltd