mirror of
https://github.com/dorny/test-reporter.git
synced 2025-12-16 22:37:09 +01:00
Fix EOL issues - remove all \r from annotation message
This commit is contained in:
parent
4197e7a327
commit
760c090915
7 changed files with 20 additions and 13 deletions
|
|
@ -2,7 +2,7 @@ import {Annotation, ParseOptions, TestResult} from '../parser-types'
|
|||
|
||||
import getReport from '../../report/get-report'
|
||||
import {normalizeFilePath} from '../../utils/file-utils'
|
||||
import {Icon} from '../../utils/markdown-utils'
|
||||
import {Icon, fixEol} from '../../utils/markdown-utils'
|
||||
|
||||
import {
|
||||
ReportEvent,
|
||||
|
|
@ -176,7 +176,7 @@ function getAnnotation(
|
|||
start_line: src.line,
|
||||
end_line: src.line,
|
||||
path: src.file,
|
||||
message: `${test.error?.error}\n\n${test.error?.stackTrace}`,
|
||||
message: `${fixEol(test.error?.error)}\n\n${fixEol(test.error?.stackTrace)}`,
|
||||
title: `[${testSuite.suite.path}] ${test.testStart.test.name}`
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ import {parseStringPromise} from 'xml2js'
|
|||
|
||||
import {normalizeFilePath} from '../../utils/file-utils'
|
||||
import {parseAttribute} from '../../utils/xml-utils'
|
||||
import {Icon} from '../../utils/markdown-utils'
|
||||
import {Icon, fixEol} from '../../utils/markdown-utils'
|
||||
|
||||
import {
|
||||
TestExecutionResult,
|
||||
|
|
@ -123,7 +123,7 @@ function getAnnotations(testClasses: TestClass[], workDir: string, trackedFiles:
|
|||
start_line: src.line,
|
||||
end_line: src.line,
|
||||
path: src.file,
|
||||
message: t.error.Message[0],
|
||||
message: fixEol(t.error.Message[0]),
|
||||
title: `[${tc.name}] ${t.name}`
|
||||
})
|
||||
}
|
||||
|
|
|
|||
|
|
@ -2,7 +2,7 @@ import {Annotation, ParseOptions, TestResult} from '../parser-types'
|
|||
import {parseStringPromise} from 'xml2js'
|
||||
|
||||
import {JunitReport, TestCase, TestSuite} from './jest-junit-types'
|
||||
import {Icon} from '../../utils/markdown-utils'
|
||||
import {fixEol, Icon} from '../../utils/markdown-utils'
|
||||
import {normalizeFilePath} from '../../utils/file-utils'
|
||||
import {parseAttribute} from '../../utils/xml-utils'
|
||||
|
||||
|
|
@ -91,7 +91,7 @@ function getAnnotations(junit: JunitReport, workDir: string, trackedFiles: strin
|
|||
start_line: src.line,
|
||||
end_line: src.line,
|
||||
path: src.file,
|
||||
message: ex,
|
||||
message: fixEol(ex),
|
||||
title: `[${suite.$.name}] ${tc.$.name.trim()}`
|
||||
})
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue