mirror of
https://github.com/dorny/test-reporter.git
synced 2025-12-15 22:07:09 +01:00
Add test on a trx report where the className attribute of TestMethod is missing
This reproduces issue #556
This commit is contained in:
parent
18430db883
commit
d1504ea554
11 changed files with 131 additions and 20 deletions
|
|
@ -39,15 +39,18 @@ describe('dotnet-trx tests', () => {
|
|||
expect(result.result).toBe('success')
|
||||
})
|
||||
|
||||
it('matches report snapshot', async () => {
|
||||
const fixturePath = path.join(__dirname, 'fixtures', 'dotnet-trx.trx')
|
||||
const outputPath = path.join(__dirname, '__outputs__', 'dotnet-trx.md')
|
||||
it.each([
|
||||
['dotnet-trx'],
|
||||
['dotnet-xunitv3']
|
||||
])('matches %s report snapshot', async (reportName) => {
|
||||
const fixturePath = path.join(__dirname, 'fixtures', `${reportName}.trx`)
|
||||
const outputPath = path.join(__dirname, '__outputs__', `${reportName}.md`)
|
||||
const filePath = normalizeFilePath(path.relative(__dirname, fixturePath))
|
||||
const fileContent = fs.readFileSync(fixturePath, {encoding: 'utf8'})
|
||||
|
||||
const opts: ParseOptions = {
|
||||
parseErrors: true,
|
||||
trackedFiles: ['DotnetTests.Unit/Calculator.cs', 'DotnetTests.XUnitTests/CalculatorTests.cs']
|
||||
trackedFiles: ['DotnetTests.Unit/Calculator.cs', 'DotnetTests.XUnitTests/CalculatorTests.cs', 'DotnetTests.XUnitV3Tests/FixtureTests.cs']
|
||||
//workDir: 'C:/Users/Michal/Workspace/dorny/test-check/reports/dotnet/'
|
||||
}
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue