fix: use test text instead of err message
This commit is contained in:
@ -109,15 +109,12 @@ document.addEventListener('DOMContentLoaded', function() {
|
|||||||
const { message, stack } = err;
|
const { message, stack } = err;
|
||||||
// we catch the error here to prevent the error from bubbling up
|
// we catch the error here to prevent the error from bubbling up
|
||||||
// and collapsing the pipe
|
// and collapsing the pipe
|
||||||
let errMessage = message.slice(0) || '';
|
newTest.err = message + '\n' + stack;
|
||||||
const assertIndex = errMessage.indexOf(': expected');
|
|
||||||
if (assertIndex !== -1) {
|
|
||||||
errMessage = errMessage.slice(0, assertIndex);
|
|
||||||
}
|
|
||||||
errMessage = errMessage.replace(/<code>(.*?)<\/code>/g, '$1');
|
|
||||||
newTest.err = errMessage + '\n' + stack;
|
|
||||||
newTest.stack = stack;
|
newTest.stack = stack;
|
||||||
newTest.message = errMessage;
|
newTest.message = text.replace(/<code>(.*?)<\/code>/g, '$1');
|
||||||
|
if (!(err instanceof chai.AssertionError)) {
|
||||||
|
console.error(err);
|
||||||
|
}
|
||||||
// RxJS catch expects an observable as a return
|
// RxJS catch expects an observable as a return
|
||||||
return of(newTest);
|
return of(newTest);
|
||||||
})
|
})
|
||||||
|
Reference in New Issue
Block a user