jest-test-hut-reporter

0.1.0 • Public • Published

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.

Readme

Keywords

Package Sidebar

Install

npm i jest-test-hut-reporter

Weekly Downloads

0

Version

0.1.0

License

MIT

Unpacked Size

9.67 kB

Total Files

12

Last publish

Collaborators

  • tobiasli