UNPKG

@assurka/jest

Version:

Assurka Jest Plugin

81 lines (63 loc) 1.43 kB
# Assurka Studio - Jest Plugin Plugin to allow jest to integrate to [Assurka Studio](https://studio.assurka.io) ### Installation ``` yarn add -D @assurka/jest ``` or ``` npm install -D @assurka/jest ``` ## Usage Add to jest config or package.json. I recommend using it with the default reporter. ```json // package.json { "jest": { "reporters": [ "default", [ "@assurka/jest", { "assurka": { "projectId": "", "secret": "", "testPlanId": "" } } ] ], "globalSetup": "@assurka/jest/dist/globalSetup.js", "globalTeardown": "@assurka/jest/dist/globalTeardown.js" } } ``` ``` // jest.config.js module.exports = { reporters: [ 'default', [ '@assurka/jest', { assurka: { projectId: '', secret: '', testPlanId: '' } } ] ], globalSetup: '@assurka/jest/dist/globalSetup.js', globalTeardown: '@assurka/jest/dist/globalTeardown.js' } ``` ## Configuration To get your Assurka configuraiton settings `projectId`, `secret` and `testPlanId` please create your account at https://studio.assurka.com ## Local Testing with Test Plans The `testPlanId` can be overridden by setting the following environment variable ``` export __ASSURKA_TESTPLAN_ID__= ``` ## License Copyright © 2022 [Assurka Limited](https://www.assurka.io)