@snapvisor/core
v7.0.0
Published
Node.js SDK for visual testing with Snapvisor.
Downloads
447
Readme
Argos Node.js SDK
Node.js SDK for visual testing with Argos. It powers the Argos CLI and the higher-level integrations (Playwright, Cypress, …), and can be used directly to upload screenshots from Node.js.
Visit the Node.js SDK documentation for guides, the API reference, and more.
Installation
npm install @snapvisor/coreUsage
Upload a directory of screenshots to Argos and create a build:
import { upload } from "@snapvisor/core";
const { build } = await upload({
// Directory containing the screenshots.
root: "./screenshots",
// Globs matching the screenshots to upload.
files: ["**/*.png"],
// Defaults to the ARGOS_TOKEN environment variable.
token: process.env.ARGOS_TOKEN,
});
console.log(`Build created: ${build.url}`);