@argos-ci/core
v6.6.2
Published
Node.js SDK for visual testing with Argos.
Maintainers
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 @argos-ci/coreUsage
Upload a directory of screenshots to Argos and create a build:
import { upload } from "@argos-ci/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}`);