| FazBrowse GitHub Viewer | Trending | | Home |
| Tools: [Download Repo ZIP] [Original HTTPS Page] |
1 parent a6ac8bd commit 3127a2b
2 files changed
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -19,11 +19,11 @@ const inspectOptions = { __proto__: null, colors: false, breakLength: Infinity } | |||
| 19 | 19 | const HOSTNAME = hostname(); | |
| 20 | 20 | ||
| 21 | 21 | function escapeAttribute(s = '') { | |
| 22 | - return escapeContent(RegExpPrototypeSymbolReplace(/"/g, RegExpPrototypeSymbolReplace(/\n/g, s, ''), '"')); | ||
| 22 | + return escapeContent(RegExpPrototypeSymbolReplace(/"/g, RegExpPrototypeSymbolReplace(/\n/g, s, ' '), '"')); | ||
| 23 | 23 | } | |
| 24 | 24 | ||
| 25 | 25 | function escapeContent(s = '') { | |
| 26 | - return RegExpPrototypeSymbolReplace(/</g, RegExpPrototypeSymbolReplace(/&/g, s, '&'), '<'); | ||
| 26 | + return RegExpPrototypeSymbolReplace(/</g, RegExpPrototypeSymbolReplace(/(&)(?!#\d{1,7};)/g, s, '&'), '<'); | ||
| 27 | 27 | } | |
| 28 | 28 | ||
| 29 | 29 | function escapeComment(s = '') { | |
@@ -137,7 +137,7 @@ module.exports = async function* junitReporter(source) { | |||
| 137 | 137 | __proto__: null, | |
| 138 | 138 | nesting: event.data.nesting + 1, | |
| 139 | 139 | tag: 'failure', | |
| 140 | - attrs: { __proto__: null, type: error?.failureType || error?.code, message: error?.message ?? '' }, | ||
| 140 | + attrs: { __proto__: null, type: error?.failureType || error?.code, message: error?.message.trim() ?? '' }, | ||
| 141 | 141 | children: [inspectWithNoCustomRetry(error, inspectOptions)], | |
| 142 | 142 | }); | |
| 143 | 143 | currentTest.failures = 1; | |
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
@@ -101,8 +101,8 @@ | |||
| 101 | 101 | } | |
| 102 | 102 | </failure> | |
| 103 | 103 | </testcase> | |
| 104 | - <testcase name="async assertion fail" time="*" classname="test" file="*" failure="Expected values to be strictly equal:true !== false"> | ||
| 105 | - <failure type="testCodeFailure" message="Expected values to be strictly equal:true !== false"> | ||
| 104 | + <testcase name="async assertion fail" time="*" classname="test" file="*" failure="Expected values to be strictly equal: true !== false "> | ||
| 105 | + <failure type="testCodeFailure" message="Expected values to be strictly equal: true !== false"> | ||
| 106 | 106 | [Error [ERR_TEST_FAILURE]: Expected values to be strictly equal: | |
| 107 | 107 | ||
| 108 | 108 | true !== false | |
@@ -316,8 +316,8 @@ Error [ERR_TEST_FAILURE]: thrown from callback async throw | |||
| 316 | 316 | [Error [ERR_TEST_FAILURE]: customized] { code: 'ERR_TEST_FAILURE', failureType: 'testCodeFailure', cause: customized } | |
| 317 | 317 | </failure> | |
| 318 | 318 | </testcase> | |
| 319 | - <testcase name="custom inspect symbol that throws fail" time="*" classname="test" file="*" failure="{ foo: 1, Symbol(nodejs.util.inspect.custom): [Function: [nodejs.util.inspect.custom]]}"> | ||
| 320 | - <failure type="testCodeFailure" message="{ foo: 1, Symbol(nodejs.util.inspect.custom): [Function: [nodejs.util.inspect.custom]]}"> | ||
| 319 | + <testcase name="custom inspect symbol that throws fail" time="*" classname="test" file="*" failure="{ foo: 1, Symbol(nodejs.util.inspect.custom): [Function: [nodejs.util.inspect.custom]] }"> | ||
| 320 | + <failure type="testCodeFailure" message="{ foo: 1, Symbol(nodejs.util.inspect.custom): [Function: [nodejs.util.inspect.custom]] }"> | ||
| 321 | 321 | [Error [ERR_TEST_FAILURE]: { | |
| 322 | 322 | foo: 1, | |
| 323 | 323 | Symbol(nodejs.util.inspect.custom): [Function: [nodejs.util.inspect.custom]] | |
@@ -413,8 +413,8 @@ Error [ERR_TEST_FAILURE]: bar | |||
| 413 | 413 | } | |
| 414 | 414 | </failure> | |
| 415 | 415 | </testcase> | |
| 416 | - <testcase name="assertion errors display actual and expected properly" time="*" classname="test" file="*" failure="Expected values to be loosely deep-equal:{ bar: 1, baz: { date: 1970-01-01T00:00:00.000Z, null: null, number: 1, string: 'Hello', undefined: undefined }, boo: [ 1 ], foo: 1}should loosely deep-equal{ baz: { date: 1970-01-01T00:00:00.000Z, null: null, number: 1, string: 'Hello', undefined: undefined }, boo: [ 1 ], circular: <ref *1> { bar: 2, c: [Circular *1] }}"> | ||
| 417 | - <failure type="testCodeFailure" message="Expected values to be loosely deep-equal:{ bar: 1, baz: { date: 1970-01-01T00:00:00.000Z, null: null, number: 1, string: 'Hello', undefined: undefined }, boo: [ 1 ], foo: 1}should loosely deep-equal{ baz: { date: 1970-01-01T00:00:00.000Z, null: null, number: 1, string: 'Hello', undefined: undefined }, boo: [ 1 ], circular: <ref *1> { bar: 2, c: [Circular *1] }}"> | ||
| 416 | + <testcase name="assertion errors display actual and expected properly" time="*" classname="test" file="*" failure="Expected values to be loosely deep-equal: { bar: 1, baz: { date: 1970-01-01T00:00:00.000Z, null: null, number: 1, string: 'Hello', undefined: undefined }, boo: [ 1 ], foo: 1 } should loosely deep-equal { baz: { date: 1970-01-01T00:00:00.000Z, null: null, number: 1, string: 'Hello', undefined: undefined }, boo: [ 1 ], circular: <ref *1> { bar: 2, c: [Circular *1] } }"> | ||
| 417 | + <failure type="testCodeFailure" message="Expected values to be loosely deep-equal: { bar: 1, baz: { date: 1970-01-01T00:00:00.000Z, null: null, number: 1, string: 'Hello', undefined: undefined }, boo: [ 1 ], foo: 1 } should loosely deep-equal { baz: { date: 1970-01-01T00:00:00.000Z, null: null, number: 1, string: 'Hello', undefined: undefined }, boo: [ 1 ], circular: <ref *1> { bar: 2, c: [Circular *1] } }"> | ||
| 418 | 418 | [Error [ERR_TEST_FAILURE]: Expected values to be loosely deep-equal: | |
| 419 | 419 | ||
| 420 | 420 | { | |
| Back | FazBrowse Home | New Git URL |
0 commit comments