All Projects → Hargne → Jest Html Reporter

Hargne / Jest Html Reporter

Licence: mit
Jest test results processor for generating a summary in HTML

Programming Languages

typescript
32286 projects

Projects that are alternatives of or similar to Jest Html Reporter

Jest Stare
Jest HTML Reporter and Results Processor
Stars: ✭ 154 (-4.35%)
Mutual labels:  html-report, processor, jest
Jest Html Reporters
🌈 Reporter for jest test framework. 🌈
Stars: ✭ 245 (+52.17%)
Mutual labels:  html-report, jest, test
xv
❌ ✔️ zero-config test runner for simple projects
Stars: ✭ 588 (+265.22%)
Mutual labels:  jest, test
jest-launchdarkly-mock
Easily unit test LaunchDarkly feature flagged components with jest
Stars: ✭ 14 (-91.3%)
Mutual labels:  jest, test
puppeteer-screenshot-tester
Small library that allows us to compare screenshots generated by puppeteer in our tests.
Stars: ✭ 50 (-68.94%)
Mutual labels:  jest, test
Vuex Mock Store
✅Simple and straightforward Vuex Store mock for vue-test-utils
Stars: ✭ 246 (+52.8%)
Mutual labels:  jest, test
walrus
🎉 Cli development framework.
Stars: ✭ 17 (-89.44%)
Mutual labels:  jest, test
reducer-tester
Utilities for testing redux reducers
Stars: ✭ 19 (-88.2%)
Mutual labels:  jest, test
Jest In Case
Jest utility for creating variations of the same test
Stars: ✭ 902 (+460.25%)
Mutual labels:  jest, test
React Generate Props
Generate default props based on your React component's PropTypes
Stars: ✭ 23 (-85.71%)
Mutual labels:  jest, test
Tyu
Unit test with no initial configuration.
Stars: ✭ 89 (-44.72%)
Mutual labels:  jest, test
Jest Expect Message
Add custom message to Jest expects 🃏🗯
Stars: ✭ 240 (+49.07%)
Mutual labels:  jest, test
Snap Shot
Jest-like snapshot feature for the rest of us, works magically by finding the right caller function
Stars: ✭ 170 (+5.59%)
Mutual labels:  jest, test
Gest
👨‍💻 A sensible GraphQL testing tool - test your GraphQL schema locally and in the cloud
Stars: ✭ 109 (-32.3%)
Mutual labels:  jest, test
Enzyme
JavaScript Testing utilities for React
Stars: ✭ 19,781 (+12186.34%)
Mutual labels:  jest, test
Esbuild Jest
A Jest transformer using esbuild
Stars: ✭ 100 (-37.89%)
Mutual labels:  jest, test
Javascript Testing Best Practices
📗🌐 🚢 Comprehensive and exhaustive JavaScript & Node.js testing best practices (August 2021)
Stars: ✭ 13,976 (+8580.75%)
Mutual labels:  jest, test
Redux Saga Testing
A no-brainer way of testing your Sagas
Stars: ✭ 150 (-6.83%)
Mutual labels:  jest
React Native Testing Library
🦉 Simple and complete React Native testing utilities that encourage good testing practices.
Stars: ✭ 2,191 (+1260.87%)
Mutual labels:  jest
Vantpy
基于Selenium+unittest的WebUI自动化测试框架,使用POM(页面对象模型)设计模式,适合几乎所有web项目,可集成Jenkins部署自动化测试
Stars: ✭ 149 (-7.45%)
Mutual labels:  test

📜

jest-html-reporter

A Jest test results processor for generating a summary in HTML.
Documentation »



Inspired by karma-htmlfile-reporter



Installation

$ yarn add jest-html-reporter --dev

Usage

Configure Jest to process the test results by adding the following entry to the Jest config (jest.config.json):

"reporters": [
	"default",
	["./node_modules/jest-html-reporter", {
		"pageTitle": "Test Report"
	}]
]

As you run Jest from within the terminal, a file called test-report.html will be created within your root folder containing information about your tests.

There are multiple configuration options available. To read more about these, please refer to the documentation.

Alternative Usage as a Test Results Processor

To run the reporter as a test results processor (after Jest is complete instead of running in parallel), add the following entry to the Jest config (jest.config.json):

{
	"testResultsProcessor": "./node_modules/jest-html-reporter"
}

Note: When running as a testResultsProcessor, the configuration needs be placed within a new file named jesthtmlreporter.config.json residing in the root folder. More information about this can be found in the documentation.

Node Compatibility

This plugin is compatible with Node version ^4.8.3

Configuration

Please note that all configuration properties are optional.

Property Type Description Default
append BOOLEAN If set to true, new test results will be appended to the existing test report false
boilerplate STRING The path to a boilerplate file that should be used to render the body of the test results into. {jesthtmlreporter-content} within the boilerplate will be replaced with the test results null
customScriptPath STRING Path to a javascript file that should be injected into the test report null
dateFormat STRING The format in which date/time should be formatted in the test report. Have a look in the documentation for the available date format variables. "yyyy-mm-dd HH:MM:ss"
executionTimeWarningThreshold NUMBER The threshold for test execution time (in seconds) in each test suite that will render a warning on the report page. 5 seconds is the default timeout in Jest. 5
includeConsoleLog BOOLEAN If set to true, this will output all triggered console logs for each test suite. Please note that you have to run Jest together with --verbose=false in order to have Jest catch any logs during the tests. false
includeFailureMsg BOOLEAN If this setting is set to true, this will output the detailed failure message for each failed test. false
includeSuiteFailure BOOLEAN If set to true, this will output the detailed failure message for complete suite failures. false
includeObsoleteSnapshots BOOLEAN If set to true, this will output obsolete snapshot names. false
logo STRING Path to a logo that will be included in the header of the report null
outputPath STRING The path to where the plugin will output the HTML report. The path must include the filename and end with .html "./test-report.html"
pageTitle STRING The title of the document. This string will also be outputted on the top of the page. "Test Suite"
sort STRING Sorts the test results using the given method. Available sorting methods can be found in the documentation. "default"
statusIgnoreFilter STRING A comma-separated string of the test result statuses that should be ignored when rendering the report. Available statuses are: "passed", "pending", "failed" null
styleOverridePath STRING The path to a file containing CSS styles that should override the default styling.* null
useCssFile BOOLEAN If set to true, the CSS styles will link in the current theme's .css file instead of inlining its content on the page false

*The plugin will search for the *styleOverridePath* from the root directory, therefore there is no need to prepend the string with ./ or ../ - You can read more about the themes in the documentation.

Continuous Integration

Configuration may also be performed with environment variables for dynamic file saving paths in different environments. *NOTE: Environment variables will take precedence over configurations set in jesthtmlreporter.config.json and package.json*

Example

Here is an example of dynamically naming your output file and test report title to match your current branch that one might see in a automated deployment pipeline before running their tests.

export BRANCH_NAME=`git symbolic-ref HEAD 2>/dev/null | cut -d"/" -f 3`
export JEST_HTML_REPORTER_OUTPUT_PATH=/home/username/jest-test-output/test-reports/"$BRANCH_NAME".html
export JEST_HTML_REPORTER_PAGE_TITLE="$BRANCH_NAME"\ Test\ Report

Configuration Environment Variables

The environment variables reflect the configuration options available in JSON format. Please read the documentation for more information on these variables.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].