UNPKG

@assurka/cypress

Version:

Assurka Cypress Plugin

83 lines (64 loc) 1.6 kB
# Assurka Studio - Cypress Plugin Plugin to allow cypress to integrate to [Assurka Studio](https://studio.assurka.io) ## Installation Requires [Node](https://nodejs.org) version 10 or above. ```sh npm install --save-dev @assurka/cypress ``` ## Usage Learn more about how the Plugins file works, see [plugins file](https://on.cypress.io/plugins-file). ### Cypress 10.0+ ```typescript import { defineConfig } from "cypress"; import { assurka } from "@assurka/cypress"; export default defineConfig({ e2e: { setupNodeEvents(on, config) { assurka(on, config, { projectId: "projectId", secret: "secret", testPlanId: "testPlanId", }); }, }, }); ``` ```javascript const { defineConfig } = require("cypress"); const { assurka } = require("@assurka/cypress"); module.exports = defineConfig({ e2e: { setupNodeEvents(on, config) { assurka(on, config, { projectId: "projectId", secret: "secret", testPlanId: "testPlanId", }); }, }, }); ``` ### Prior to Cypress 10.0 ```typescript import { defineConfig } from "cypress"; import { assurka } from "@assurka/cypress"; module.exports = (on, config) => { assurka(on, config, { projectId: "projectId", secret: "secret", testPlanId: "testPlanId", }); }; ``` ```javascript const assurka = require("@assurka/cypress"); module.exports = (on, config) => { assurka(on, config, { projectId: "projectId", secret: "secret", testPlanId: "testPlanId", }); }; ``` ## License Copyright © 2022 [Assurka Limited](https://www.assurka.io)