1.0.11 • Published 5 years ago

jest-xunit v1.0.11

Weekly downloads
1,384
License
MIT
Repository
github
Last release
5 years ago

Jest XUnit

jest-xunit is a reporter for Jest that produces an XML in xunit format.

Installation

npm i -D jest-xunit

Then in your jest config specify jest-xunit as a reporter:

{
  ...
  reporters: [
		'default', // keep the default reporter
		[
			'jest-xunit',
			{
				traitsRegex: [
					{ regex: /\(Test Type:([^,)]+)(,|\)).*/g, name: 'Category' },
					{ regex: /.*Test Traits: ([^)]+)\).*/g, name: 'Type' }
				]
			}
		]
	]
  ...
}

Config

configKeyDescriptionDefault
filenameThe filename of the results. The reporter outputs xml formattest-results.xml
outputPathThe path where the test results should be generated.process.cwd()
traitsRegexAn array of objects with the following keys: regex - A regex to be used to extract the traits name - The name of the extract trait type[]
1.0.11

5 years ago

1.0.10

5 years ago

1.0.9

5 years ago

1.0.8

5 years ago

1.0.7

5 years ago

1.0.6

5 years ago

1.0.5

5 years ago

1.0.4

5 years ago

1.0.3

5 years ago

1.0.2

5 years ago

1.0.1

5 years ago

1.0.0

5 years ago