Use normalizeFilePath() to unify test output on windows/Linux

This commit is contained in:
Michal Dorner 2021-01-16 23:06:50 +01:00
parent 97dfc915c5
commit 6f3367ef61
No known key found for this signature in database
GPG key ID: 9EEE04B48DA36786
9 changed files with 12 additions and 9 deletions

View file

@ -1,4 +1,4 @@
### fixtures\dart-json.json
### fixtures/dart-json.json
**6** tests were completed in **3.760s** with **1** passed, **1** skipped and **4** failed.

View file

@ -1,4 +1,4 @@
### fixtures\dotnet-trx.trx
### fixtures/dotnet-trx.trx
**7** tests were completed in **1.061s** with **3** passed, **1** skipped and **3** failed.

View file

@ -1,4 +1,4 @@
### fixtures\jest-junit.xml
### fixtures/jest-junit.xml
**6** tests were completed in **1.360s** with **1** passed, **1** skipped and **4** failed.

View file

@ -52,7 +52,7 @@ dart:isolate _RawReceivePortImpl._handleMessage
"title": "[test\\\\second_test.dart] Timeout test",
},
],
"summary": "### fixtures\\\\dart-json.json
"summary": "### fixtures/dart-json.json
**6** tests were completed in **3.760s** with **1** passed, **1** skipped and **4** failed.

View file

@ -30,7 +30,7 @@ Actual: 2",
"title": "[DotnetTests.XUnitTests.CalculatorTests] Failing_Test",
},
],
"summary": "### fixtures\\\\dotnet-trx.trx
"summary": "### fixtures/dotnet-trx.trx
**7** tests were completed in **1.061s** with **3** passed, **1** skipped and **3** failed.

View file

@ -73,7 +73,7 @@ Received: false
"title": "[__tests__\\\\second.test.js] Timeout test",
},
],
"summary": "### fixtures\\\\jest-junit.xml
"summary": "### fixtures/jest-junit.xml
**6** tests were completed in **1.360s** with **1** passed, **1** skipped and **4** failed.

View file

@ -3,11 +3,12 @@ import * as path from 'path'
import {parseDartJson} from '../src/parsers/dart-json/dart-json-parser'
import {ParseOptions} from '../src/parsers/parser-types'
import {normalizeFilePath} from '../src/utils/file-utils'
const fixturePath = path.join(__dirname, 'fixtures', 'dart-json.json')
const outputPath = path.join(__dirname, '__outputs__', 'dart-json.md')
const xmlFixture = {
path: path.relative(__dirname, fixturePath),
path: normalizeFilePath(path.relative(__dirname, fixturePath)),
content: fs.readFileSync(fixturePath, {encoding: 'utf8'})
}

View file

@ -3,11 +3,12 @@ import * as path from 'path'
import {parseDotnetTrx} from '../src/parsers/dotnet-trx/dotnet-trx-parser'
import {ParseOptions} from '../src/parsers/parser-types'
import {normalizeFilePath} from '../src/utils/file-utils'
const fixturePath = path.join(__dirname, 'fixtures', 'dotnet-trx.trx')
const outputPath = path.join(__dirname, '__outputs__', 'dotnet-trx.md')
const xmlFixture = {
path: path.relative(__dirname, fixturePath),
path: normalizeFilePath(path.relative(__dirname, fixturePath)),
content: fs.readFileSync(fixturePath, {encoding: 'utf8'})
}

View file

@ -3,11 +3,12 @@ import * as path from 'path'
import {parseJestJunit} from '../src/parsers/jest-junit/jest-junit-parser'
import {ParseOptions} from '../src/parsers/parser-types'
import {normalizeFilePath} from '../src/utils/file-utils'
const fixturePath = path.join(__dirname, 'fixtures', 'jest-junit.xml')
const outputPath = path.join(__dirname, '__outputs__', 'jest-junit.md')
const xmlFixture = {
path: path.relative(__dirname, fixturePath),
path: normalizeFilePath(path.relative(__dirname, fixturePath)),
content: fs.readFileSync(fixturePath, {encoding: 'utf8'})
}