Skip to content

Commit

Permalink
Use normalizeFilePath() to unify test output on windows/Linux
Browse files Browse the repository at this point in the history
  • Loading branch information
Michal Dorner committed Jan 16, 2021
1 parent 97dfc91 commit 6f3367e
Show file tree
Hide file tree
Showing 9 changed files with 12 additions and 9 deletions.
2 changes: 1 addition & 1 deletion __tests__/__outputs__/dart-json.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
2 changes: 1 addition & 1 deletion __tests__/__outputs__/dotnet-trx.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
2 changes: 1 addition & 1 deletion __tests__/__outputs__/jest-junit.md
Original file line number Diff line number Diff line change
@@ -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.

Expand Down
2 changes: 1 addition & 1 deletion __tests__/__snapshots__/dart-json.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion __tests__/__snapshots__/dotnet-trx.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
2 changes: 1 addition & 1 deletion __tests__/__snapshots__/jest-junit.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -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.
Expand Down
3 changes: 2 additions & 1 deletion __tests__/dart-json.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'})
}

Expand Down
3 changes: 2 additions & 1 deletion __tests__/dotnet-trx.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'})
}

Expand Down
3 changes: 2 additions & 1 deletion __tests__/jest-junit.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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'})
}

Expand Down

0 comments on commit 6f3367e

Please sign in to comment.