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

visual-test-naldo

v1.0.2

Published

🛠️ Exemplo Prático com Resemble.js - Instalação ```sh npm init -y npm install resemblejs fs-extra ```

Readme

Visual Test - Estrutura de Testes Visuais com Pixelmatch + Jimp

Este pacote fornece uma estrutura de testes visuais (visual regression testing) usando pixelmatch e jimp, onde são comparadas imagens base e atuais, gerando imagens de diferença e um relatório HTML profissional com status, porcentagem de diferença, sobreposição de imagens, filtros, expandir imagens e suporte a múltiplos formatos.

🛠️ Requisitos

  • Node.js (v14 ou superior)
  • npm

📦 Instalação

Via NPM

npm install visual-test-naldo

Execute com:

npx

npx visual-test-naldo

ou

npm

npm run visual-test

🧪 Funcionalidades

Comparação de Imagens

  • Suporte a múltiplos formatos: .png, .jpg, .jpeg, .gif, .bmp, .tiff, .webp
  • Comparação pixel a pixel com pixelmatch
  • Geração de imagem de diferença
  • Cálculo de porcentagem de diferença

Relatório HTML Profissional

  • Tabela com status (passou/falhou)
  • Gráfico de barras com porcentagem de diferença
  • Visualização de imagens lado a lado
  • Botão para sobrepor imagem base com diferença
  • Expandir imagens ao clicar
  • Filtros de status (todos, passaram, falharam)
  • Exportação para PDF (via impressão)
  • Layout moderno e responsivo

CLI Interativo

  • Prompt para informar caminhos de baseline, current e output
  • Validação de pastas
  • Criação automática de pasta de saída

📁 Descrição dos Caminhos

  • baseline: Pasta contendo as imagens base (padrão ou esperado), que servirão como referência para comparação.
  • current: Pasta contendo as imagens atuais (novas ou em teste), que serão comparadas com as imagens base.
  • output: Pasta onde serão salvas as imagens de diferença e o relatório HTML gerado.

⚠️ Importante:

  • As imagens em baseline e current devem ter o mesmo nome para que a comparação funcione corretamente. Ex: img1.png em baseline será comparada com img1.png em current.