Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

@percy/cli

Package Overview
Dependencies
Maintainers
1
Versions
249
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@percy/cli

[![Test](https://github.com/percy/cli/workflows/Test/badge.svg)](https://github.com/percy/cli/actions)

  • 1.30.3
  • latest
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
348K
increased by6.89%
Maintainers
1
Weekly downloads
 
Created

What is @percy/cli?

@percy/cli is a command-line interface for Percy, a visual testing and review platform. It allows you to automate visual testing for your web applications by capturing screenshots and comparing them against baselines to detect visual changes.

What are @percy/cli's main functionalities?

Snapshot

This feature allows you to capture snapshots of your web application at different screen widths. The code sample demonstrates how to capture snapshots of a local web application running on port 3000 at three different screen widths.

const percySnapshot = require('@percy/cli');

(async () => {
  await percySnapshot('http://localhost:3000', { widths: [375, 768, 1280] });
})();

Start and Stop Percy

This feature allows you to start and stop the Percy agent programmatically. The code sample demonstrates how to start the Percy agent, run your tests, and then stop the agent.

const { start, stop } = require('@percy/cli');

(async () => {
  await start();
  // Run your tests here
  await stop();
})();

Upload Snapshots

This feature allows you to upload pre-captured snapshots to Percy for comparison. The code sample demonstrates how to upload snapshots from a local directory.

const { upload } = require('@percy/cli');

(async () => {
  await upload({ snapshots: ['./snapshots'] });
})();

Other packages similar to @percy/cli

FAQs

Package last updated on 28 Nov 2024

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc