Skip to content
Permalink

Comparing changes

Choose two branches to see what’s changed or to start a new pull request. If you need to, you can also or learn more about diff comparisons.

Open a pull request

Create a new pull request by comparing changes across two branches. If you need to, you can also . Learn more about diff comparisons here.
base repository: Hargne/jest-html-reporter
Failed to load repositories. Confirm that selected base ref is valid, then try again.
Loading
base: 3.5.0
Choose a base ref
...
head repository: Hargne/jest-html-reporter
Failed to load repositories. Confirm that selected head ref is valid, then try again.
Loading
compare: 3.6.0
Choose a head ref
  • 4 commits
  • 4 files changed
  • 2 contributors

Commits on Jun 3, 2022

  1. Verified

    This commit was signed with the committer’s verified signature. The key has expired.
    armano2 Armano
    Copy the full SHA
    c0477c4 View commit details

Commits on Jul 16, 2022

  1. Merge pull request #149 from StefanPuia/master

    bump jest and peer deps to v28
    Hargne authored Jul 16, 2022

    Verified

    This commit was created on GitHub.com and signed with GitHub’s verified signature. The key has expired.
    Copy the full SHA
    9fc367b View commit details
  2. Bump version

    Hargne committed Jul 16, 2022
    Copy the full SHA
    4b5ac4b View commit details
  3. Copy the full SHA
    71e5c3b View commit details
Showing with 2,509 additions and 3,340 deletions.
  1. +11 −10 package.json
  2. +2 −2 src/htmlreporter.ts
  3. +24 −6 test/mockdata/index.ts
  4. +2,472 −3,322 yarn.lock
21 changes: 11 additions & 10 deletions package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "jest-html-reporter",
"version": "3.5.0",
"version": "3.6.0",
"description": "Jest test results processor for generating a summary in HTML",
"main": "dist/index.js",
"unpkg": "dist/index.js",
@@ -40,34 +40,35 @@
"@babel/core": "^7.9.0",
"@babel/preset-env": "^7.8.7",
"@babel/preset-typescript": "^7.8.3",
"@jest/console": "^25.1.0",
"@jest/test-result": "^25.1.0",
"@jest/types": "^26.0.23",
"@jest/console": "^28.1.0",
"@jest/test-result": "^28.1.0",
"@jest/types": "^28.1.0",
"dateformat": "3.0.2",
"mkdirp": "^1.0.3",
"sinon": "^9.0.1",
"strip-ansi": "6.0.1",
"xmlbuilder": "15.0.0"
},
"peerDependencies": {
"jest": "19.x - 27.x"
"jest": "19.x - 28.x",
"typescript": "^3.7.x || ^4.3.x"
},
"devDependencies": {
"@rollup/plugin-babel": "^5.3.0",
"@rollup/plugin-node-resolve": "^7.1.1",
"@types/dateformat": "^3.0.X",
"@types/jest": "27.4.0",
"@types/jest": "28.1.0",
"@types/mkdirp": "1.0.2",
"@types/node": "12.20.12",
"@types/sinon": "9.0.11",
"babel-jest": "^27.0.1",
"jest": "^27.0.1",
"babel-jest": "^28.1.0",
"jest": "^28.1.0",
"rollup": "2.47.0",
"rollup-plugin-terser": "7.0.2",
"ts-jest": "^27.0.1",
"ts-jest": "^28.0.4",
"tslint": "^5.12.0",
"tslint-config-prettier": "^1.18.0",
"typescript": "^3.7.2"
"typescript": "^4.3.x"
},
"browserslist": [
"since 2017-06"
4 changes: 2 additions & 2 deletions src/htmlreporter.ts
Original file line number Diff line number Diff line change
@@ -703,8 +703,8 @@ class HTMLReporter {
* @param filePath
*/
public replaceRootDirInPath(
rootDir: Config.Path,
filePath: Config.Path
rootDir: Config.GlobalConfig['rootDir'],
filePath: Config.GlobalConfig['testPathPattern']
): string {
if (!/^<rootDir>/.test(filePath)) {
return filePath;
30 changes: 24 additions & 6 deletions test/mockdata/index.ts
Original file line number Diff line number Diff line change
@@ -54,6 +54,8 @@ export const mockedJestResponseSingleTestResult: AggregatedResult = {
perfStats: {
start: 1498476492,
end: 1498476650,
runtime: 158,
slow: false
},
snapshot: {
added: 0,
@@ -68,7 +70,6 @@ export const mockedJestResponseSingleTestResult: AggregatedResult = {
skipped: false,
displayName: undefined,
leaks: false,
sourceMaps: undefined,
coverage: undefined,
openHandles: [],
testResults: [
@@ -77,6 +78,7 @@ export const mockedJestResponseSingleTestResult: AggregatedResult = {
status: "passed",
ancestorTitles: ["ancestor"],
failureMessages: [],
failureDetails: [],
numPassingAsserts: 0,
fullName: undefined,
location: null,
@@ -87,6 +89,7 @@ export const mockedJestResponseSingleTestResult: AggregatedResult = {
status: "failed",
ancestorTitles: ["ancestor"],
failureMessages: [],
failureDetails: [],
numPassingAsserts: 0,
fullName: undefined,
location: null,
@@ -97,6 +100,7 @@ export const mockedJestResponseSingleTestResult: AggregatedResult = {
status: "pending",
ancestorTitles: ["ancestor"],
failureMessages: ["failure"],
failureDetails: ["detailed failure"],
numPassingAsserts: 0,
fullName: undefined,
location: null,
@@ -129,7 +133,6 @@ export const mockedJestResponseMultipleTestResult: AggregatedResult = {
skipped: false,
displayName: undefined,
leaks: false,
sourceMaps: undefined,
coverage: undefined,
openHandles: [],
testResults: [
@@ -138,6 +141,7 @@ export const mockedJestResponseMultipleTestResult: AggregatedResult = {
status: "passed",
ancestorTitles: ["ancestor b"],
failureMessages: [],
failureDetails: [],
numPassingAsserts: 0,
fullName: undefined,
location: null,
@@ -148,6 +152,7 @@ export const mockedJestResponseMultipleTestResult: AggregatedResult = {
status: "passed",
ancestorTitles: ["ancestor c"],
failureMessages: [],
failureDetails: [],
numPassingAsserts: 0,
fullName: undefined,
location: null,
@@ -158,6 +163,7 @@ export const mockedJestResponseMultipleTestResult: AggregatedResult = {
status: "passed",
ancestorTitles: ["ancestor a"],
failureMessages: [],
failureDetails: [],
numPassingAsserts: 0,
fullName: undefined,
location: null,
@@ -167,6 +173,8 @@ export const mockedJestResponseMultipleTestResult: AggregatedResult = {
perfStats: {
start: 1498476492,
end: 1498476640,
runtime: 148,
slow: false
},
testFilePath: "index-a.js",
},
@@ -189,7 +197,6 @@ export const mockedJestResponseMultipleTestResult: AggregatedResult = {
skipped: false,
displayName: undefined,
leaks: false,
sourceMaps: undefined,
coverage: undefined,
openHandles: [],
testResults: [
@@ -198,6 +205,7 @@ export const mockedJestResponseMultipleTestResult: AggregatedResult = {
status: "pending",
ancestorTitles: ["ancestor b"],
failureMessages: [],
failureDetails: [],
numPassingAsserts: 0,
fullName: undefined,
location: null,
@@ -208,6 +216,7 @@ export const mockedJestResponseMultipleTestResult: AggregatedResult = {
status: "failed",
ancestorTitles: ["ancestor c", "ancestor child"],
failureMessages: ["failure"],
failureDetails: ["detailed failure"],
numPassingAsserts: 0,
fullName: undefined,
location: null,
@@ -218,6 +227,7 @@ export const mockedJestResponseMultipleTestResult: AggregatedResult = {
status: "passed",
ancestorTitles: ["ancestor a"],
failureMessages: [],
failureDetails: [],
numPassingAsserts: 0,
fullName: undefined,
location: null,
@@ -227,6 +237,8 @@ export const mockedJestResponseMultipleTestResult: AggregatedResult = {
perfStats: {
start: 1498476492,
end: 1498476639,
runtime: 147,
slow: false
},
testFilePath: "index-b.js",
},
@@ -249,7 +261,6 @@ export const mockedJestResponseMultipleTestResult: AggregatedResult = {
skipped: false,
displayName: undefined,
leaks: false,
sourceMaps: undefined,
coverage: undefined,
openHandles: [],
testResults: [
@@ -258,6 +269,7 @@ export const mockedJestResponseMultipleTestResult: AggregatedResult = {
status: "pending",
ancestorTitles: ["ancestor a"],
failureMessages: [],
failureDetails: [],
numPassingAsserts: 0,
fullName: undefined,
location: null,
@@ -268,6 +280,7 @@ export const mockedJestResponseMultipleTestResult: AggregatedResult = {
status: "failed",
ancestorTitles: ["ancestor c"],
failureMessages: ["failure"],
failureDetails: ["detailed failure"],
numPassingAsserts: 0,
fullName: undefined,
location: null,
@@ -278,6 +291,7 @@ export const mockedJestResponseMultipleTestResult: AggregatedResult = {
status: "passed",
ancestorTitles: ["ancestor b"],
failureMessages: [],
failureDetails: [],
numPassingAsserts: 0,
fullName: undefined,
location: null,
@@ -287,6 +301,8 @@ export const mockedJestResponseMultipleTestResult: AggregatedResult = {
perfStats: {
start: 1498476492,
end: 1498476650,
runtime: 158,
slow: false
},
testFilePath: "index-c.js",
},
@@ -310,13 +326,14 @@ export const mockedJestResponseMultipleTestResult: AggregatedResult = {
skipped: false,
displayName: undefined,
leaks: false,
sourceMaps: undefined,
coverage: undefined,
openHandles: [],
testResults: [],
perfStats: {
start: 0,
end: 0,
runtime: 0,
slow: false
},
testFilePath: "index-d.js",
},
@@ -328,6 +345,8 @@ export const mockedSingleTestResultReportHTML = `<div id="jesthtml-content"><hea

export const mockedJestGlobalConfig: Config.GlobalConfig = {
bail: 0,
ci: false,
snapshotFormat: {},
changedFilesWithAncestor: false,
changedSince: undefined,
coverageProvider: "v8",
@@ -341,7 +360,6 @@ export const mockedJestGlobalConfig: Config.GlobalConfig = {
},
detectLeaks: false,
detectOpenHandles: false,
enabledTestsMap: undefined,
errorOnDeprecated: false,
expand: false,
filter: null,
5,794 changes: 2,472 additions & 3,322 deletions yarn.lock

Large diffs are not rendered by default.