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

jest-test-hut-reporter

Package Overview
Dependencies
Maintainers
1
Versions
2
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

jest-test-hut-reporter

Jest Reporter for uploading test runs to Test Hut.

0.1.0
latest
Source
npm
Version published
Maintainers
1
Created
Source

Jest Test Hut reporter

Build Status Available on NPM

Jest Reporter for uploading test runs to Test Hut.

https://test-hut.tobiaslindstrom.se/

API

Installation and Jest configuration

Install:

npm install --save-dev jest-test-hut-reporter

Configuration in package.json:

{
  "jest": {
    "reporters": ["default", "jest-test-hut-reporter"]
  }
}

Add image to be viewable in Test Hut

Use the function addImage to add images to be viewable in Test Hut. It will automatically be connected to the file and line number the function is run at.

const { addImage } = require('jest-test-hut-reporter')

it('Test', async () => {
  const base64Image = await screenshotApp()

  await addImage(base64Image)
})

Jest --testLocationInResults

Run Jest with the argument --testLocationInResults to get line numbers for the test cases.

Environment variables

Required

  • TEST_HUT_KEY API key for the project shown in Test Hut.

Optional

  • TEST_INGESTER_URL Used to override the URL to send the test runs to.

Keywords

jest

FAQs

Package last updated on 12 Aug 2022

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