mirror of
https://github.com/dorny/test-reporter.git
synced 2025-12-17 06:47:09 +01:00
add test confirming default values
This commit is contained in:
parent
d2b85139de
commit
e2e6a65f8d
3 changed files with 748 additions and 0 deletions
|
|
@ -203,4 +203,25 @@ describe('java-junit tests', () => {
|
|||
fs.mkdirSync(path.dirname(outputPath), {recursive: true})
|
||||
fs.writeFileSync(outputPath, report)
|
||||
})
|
||||
it('playwright test report - default options', async () => {
|
||||
const fixturePath = path.join(__dirname, 'fixtures', 'external', 'java', 'playwright-report.xml')
|
||||
const trackedFilesPath = path.join(__dirname, 'fixtures', 'external', 'java', 'files.txt')
|
||||
const outputPath = path.join(__dirname, '__outputs__', 'playwright-output-default.md')
|
||||
const filePath = normalizeFilePath(path.relative(__dirname, fixturePath))
|
||||
const fileContent = fs.readFileSync(fixturePath, {encoding: 'utf8'})
|
||||
|
||||
const trackedFiles = fs.readFileSync(trackedFilesPath, {encoding: 'utf8'}).split(/\n\r?/g)
|
||||
const opts: ParseOptions = {
|
||||
parseErrors: true,
|
||||
trackedFiles
|
||||
}
|
||||
|
||||
const parser = new JavaJunitParser(opts)
|
||||
const result = await parser.parse(filePath, fileContent)
|
||||
expect(result).toMatchSnapshot()
|
||||
|
||||
const report = getReport([result])
|
||||
fs.mkdirSync(path.dirname(outputPath), {recursive: true})
|
||||
fs.writeFileSync(outputPath, report)
|
||||
})
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue