New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More

@percy/core

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@percy/core

The core component of Percy's CLI and SDKs that handles creating builds, discovering snapshot assets, uploading snapshots, and finalizing builds. Uses `@percy/client` for API communication, a Chromium browser for asset discovery, and starts a local API se


Version published
Weekly downloads
439K
increased by3.05%
Maintainers
1
Weekly downloads
 
Created

What is @percy/core?

@percy/core is a core library for Percy, a visual testing and review platform. It allows developers to capture screenshots of web pages and compare them to baseline images to detect visual changes. This package provides the core functionality needed to integrate Percy into various testing frameworks and CI/CD pipelines.

What are @percy/core's main functionalities?

Initialize Percy

This code initializes a new instance of Percy, which is the first step in setting up visual testing for your project.

const Percy = require('@percy/core');
const percy = new Percy();

Capture a Snapshot

This code captures a snapshot of the specified URL. The snapshot is then compared to the baseline image to detect any visual changes.

await percy.snapshot('Home Page', { url: 'http://localhost:3000' });

Finalize Percy

This code finalizes the Percy session, uploading all captured snapshots for comparison and review.

await percy.finalize();

Other packages similar to @percy/core

FAQs

Package last updated on 23 Jan 2025

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