mirror of
https://github.com/dorny/test-reporter.git
synced 2025-12-17 14:57:09 +01:00
Merge remote-tracking branch 'upstream/main'
This commit is contained in:
parent
258d3a0780
commit
dd2ae7c835
38 changed files with 40986 additions and 17818 deletions
10
__tests__/__outputs__/jest-react-component-test-results.md
Normal file
10
__tests__/__outputs__/jest-react-component-test-results.md
Normal file
|
|
@ -0,0 +1,10 @@
|
|||

|
||||
## ✅ <a id="user-content-r0" href="#r0">fixtures/external/jest/jest-react-component-test-results.xml</a>
|
||||
**1** tests were completed in **1000ms** with **1** passed, **0** failed and **0** skipped.
|
||||
|Test suite|Passed|Failed|Skipped|Time|
|
||||
|:---|---:|---:|---:|---:|
|
||||
|[\<Component /\>](#r0s0)|1✅|||798ms|
|
||||
### ✅ <a id="user-content-r0s0" href="#r0s0">\<Component /\></a>
|
||||
```
|
||||
✅ <Component /> should render properly
|
||||
```
|
||||
13
__tests__/__outputs__/swift-xunit.md
Normal file
13
__tests__/__outputs__/swift-xunit.md
Normal file
|
|
@ -0,0 +1,13 @@
|
|||

|
||||
## ❌ <a id="user-content-r0" href="#r0">fixtures/swift-xunit.xml</a>
|
||||
**3** tests were completed in **220ms** with **2** passed, **1** failed and **0** skipped.
|
||||
|Test suite|Passed|Failed|Skipped|Time|
|
||||
|:---|---:|---:|---:|---:|
|
||||
|[TestResults](#r0s0)|2✅|1❌||220ms|
|
||||
### ❌ <a id="user-content-r0s0" href="#r0s0">TestResults</a>
|
||||
```
|
||||
AcmeLibTests.AcmeLibTests
|
||||
✅ test_always_pass
|
||||
✅ test_always_skip
|
||||
❌ test_always_fail
|
||||
```
|
||||
|
|
@ -3,12 +3,12 @@
|
|||
exports[`dart-json tests matches report snapshot 1`] = `
|
||||
TestRunResult {
|
||||
"path": "fixtures/dart-json.json",
|
||||
"suites": Array [
|
||||
"suites": [
|
||||
TestSuiteResult {
|
||||
"groups": Array [
|
||||
"groups": [
|
||||
TestGroupResult {
|
||||
"name": "Test 1",
|
||||
"tests": Array [
|
||||
"tests": [
|
||||
TestCaseResult {
|
||||
"error": undefined,
|
||||
"name": "Passing test",
|
||||
|
|
@ -19,11 +19,11 @@ TestRunResult {
|
|||
},
|
||||
TestGroupResult {
|
||||
"name": "Test 1 Test 1.1",
|
||||
"tests": Array [
|
||||
"tests": [
|
||||
TestCaseResult {
|
||||
"error": Object {
|
||||
"error": {
|
||||
"details": "package:test_api expect
|
||||
test\\\\main_test.dart 13:9 main.<fn>.<fn>.<fn>
|
||||
test\\main_test.dart 13:9 main.<fn>.<fn>.<fn>
|
||||
",
|
||||
"line": 13,
|
||||
"message": "Expected: <2>
|
||||
|
|
@ -36,9 +36,9 @@ test\\\\main_test.dart 13:9 main.<fn>.<fn>.<fn>
|
|||
"time": 20,
|
||||
},
|
||||
TestCaseResult {
|
||||
"error": Object {
|
||||
"error": {
|
||||
"details": "package:darttest/main.dart 2:3 throwError
|
||||
test\\\\main_test.dart 17:9 main.<fn>.<fn>.<fn>
|
||||
test\\main_test.dart 17:9 main.<fn>.<fn>.<fn>
|
||||
",
|
||||
"line": 17,
|
||||
"message": "Exception: Some error",
|
||||
|
|
@ -52,10 +52,10 @@ test\\\\main_test.dart 17:9 main.<fn>.<fn>.<fn>
|
|||
},
|
||||
TestGroupResult {
|
||||
"name": "Test 2",
|
||||
"tests": Array [
|
||||
"tests": [
|
||||
TestCaseResult {
|
||||
"error": Object {
|
||||
"details": "test\\\\main_test.dart 24:7 main.<fn>.<fn>
|
||||
"error": {
|
||||
"details": "test\\main_test.dart 24:7 main.<fn>.<fn>
|
||||
",
|
||||
"line": 24,
|
||||
"message": "Exception: Some error",
|
||||
|
|
@ -72,12 +72,12 @@ test\\\\main_test.dart 17:9 main.<fn>.<fn>.<fn>
|
|||
"totalTime": undefined,
|
||||
},
|
||||
TestSuiteResult {
|
||||
"groups": Array [
|
||||
"groups": [
|
||||
TestGroupResult {
|
||||
"name": null,
|
||||
"tests": Array [
|
||||
"tests": [
|
||||
TestCaseResult {
|
||||
"error": Object {
|
||||
"error": {
|
||||
"details": "dart:isolate _RawReceivePortImpl._handleMessage
|
||||
",
|
||||
"line": 5,
|
||||
|
|
@ -108,12 +108,12 @@ test\\\\main_test.dart 17:9 main.<fn>.<fn>.<fn>
|
|||
exports[`dart-json tests report from rrousselGit/provider test results matches snapshot 1`] = `
|
||||
TestRunResult {
|
||||
"path": "fixtures/external/flutter/provider-test-results.json",
|
||||
"suites": Array [
|
||||
"suites": [
|
||||
TestSuiteResult {
|
||||
"groups": Array [
|
||||
"groups": [
|
||||
TestGroupResult {
|
||||
"name": "valueListenableProvider",
|
||||
"tests": Array [
|
||||
"tests": [
|
||||
TestCaseResult {
|
||||
"error": undefined,
|
||||
"name": "rebuilds when value change",
|
||||
|
|
@ -139,7 +139,7 @@ TestRunResult {
|
|||
"time": 22,
|
||||
},
|
||||
TestCaseResult {
|
||||
"error": Object {
|
||||
"error": {
|
||||
"details": "══╡ EXCEPTION CAUGHT BY FLUTTER TEST FRAMEWORK ╞════════════════════════════════════════════════════
|
||||
The following TestFailure object was thrown running a test:
|
||||
Expected: <2>
|
||||
|
|
@ -178,10 +178,10 @@ Unexpected number of calls
|
|||
"totalTime": undefined,
|
||||
},
|
||||
TestSuiteResult {
|
||||
"groups": Array [
|
||||
"groups": [
|
||||
TestGroupResult {
|
||||
"name": "ListenableProvider",
|
||||
"tests": Array [
|
||||
"tests": [
|
||||
TestCaseResult {
|
||||
"error": undefined,
|
||||
"name": "works with MultiProvider",
|
||||
|
|
@ -252,7 +252,7 @@ Unexpected number of calls
|
|||
},
|
||||
TestGroupResult {
|
||||
"name": "ListenableProvider value constructor",
|
||||
"tests": Array [
|
||||
"tests": [
|
||||
TestCaseResult {
|
||||
"error": undefined,
|
||||
"name": "pass down key",
|
||||
|
|
@ -269,7 +269,7 @@ Unexpected number of calls
|
|||
},
|
||||
TestGroupResult {
|
||||
"name": "ListenableProvider stateful constructor",
|
||||
"tests": Array [
|
||||
"tests": [
|
||||
TestCaseResult {
|
||||
"error": undefined,
|
||||
"name": "called with context",
|
||||
|
|
@ -295,10 +295,10 @@ Unexpected number of calls
|
|||
"totalTime": undefined,
|
||||
},
|
||||
TestSuiteResult {
|
||||
"groups": Array [
|
||||
"groups": [
|
||||
TestGroupResult {
|
||||
"name": "consumer",
|
||||
"tests": Array [
|
||||
"tests": [
|
||||
TestCaseResult {
|
||||
"error": undefined,
|
||||
"name": "obtains value from Provider<T>",
|
||||
|
|
@ -321,7 +321,7 @@ Unexpected number of calls
|
|||
},
|
||||
TestGroupResult {
|
||||
"name": "consumer2",
|
||||
"tests": Array [
|
||||
"tests": [
|
||||
TestCaseResult {
|
||||
"error": undefined,
|
||||
"name": "obtains value from Provider<T>",
|
||||
|
|
@ -344,7 +344,7 @@ Unexpected number of calls
|
|||
},
|
||||
TestGroupResult {
|
||||
"name": "consumer3",
|
||||
"tests": Array [
|
||||
"tests": [
|
||||
TestCaseResult {
|
||||
"error": undefined,
|
||||
"name": "obtains value from Provider<T>",
|
||||
|
|
@ -367,7 +367,7 @@ Unexpected number of calls
|
|||
},
|
||||
TestGroupResult {
|
||||
"name": "consumer4",
|
||||
"tests": Array [
|
||||
"tests": [
|
||||
TestCaseResult {
|
||||
"error": undefined,
|
||||
"name": "obtains value from Provider<T>",
|
||||
|
|
@ -390,7 +390,7 @@ Unexpected number of calls
|
|||
},
|
||||
TestGroupResult {
|
||||
"name": "consumer5",
|
||||
"tests": Array [
|
||||
"tests": [
|
||||
TestCaseResult {
|
||||
"error": undefined,
|
||||
"name": "obtains value from Provider<T>",
|
||||
|
|
@ -413,7 +413,7 @@ Unexpected number of calls
|
|||
},
|
||||
TestGroupResult {
|
||||
"name": "consumer6",
|
||||
"tests": Array [
|
||||
"tests": [
|
||||
TestCaseResult {
|
||||
"error": undefined,
|
||||
"name": "obtains value from Provider<T>",
|
||||
|
|
@ -439,10 +439,10 @@ Unexpected number of calls
|
|||
"totalTime": undefined,
|
||||
},
|
||||
TestSuiteResult {
|
||||
"groups": Array [
|
||||
"groups": [
|
||||
TestGroupResult {
|
||||
"name": "",
|
||||
"tests": Array [
|
||||
"tests": [
|
||||
TestCaseResult {
|
||||
"error": undefined,
|
||||
"name": "Use builder property, not child",
|
||||
|
|
@ -453,7 +453,7 @@ Unexpected number of calls
|
|||
},
|
||||
TestGroupResult {
|
||||
"name": "ChangeNotifierProvider",
|
||||
"tests": Array [
|
||||
"tests": [
|
||||
TestCaseResult {
|
||||
"error": undefined,
|
||||
"name": "value",
|
||||
|
|
@ -515,10 +515,10 @@ Unexpected number of calls
|
|||
"totalTime": undefined,
|
||||
},
|
||||
TestSuiteResult {
|
||||
"groups": Array [
|
||||
"groups": [
|
||||
TestGroupResult {
|
||||
"name": "ChangeNotifierProvider",
|
||||
"tests": Array [
|
||||
"tests": [
|
||||
TestCaseResult {
|
||||
"error": undefined,
|
||||
"name": "default",
|
||||
|
|
@ -535,7 +535,7 @@ Unexpected number of calls
|
|||
},
|
||||
TestGroupResult {
|
||||
"name": "ListenableProvider",
|
||||
"tests": Array [
|
||||
"tests": [
|
||||
TestCaseResult {
|
||||
"error": undefined,
|
||||
"name": "default",
|
||||
|
|
@ -552,7 +552,7 @@ Unexpected number of calls
|
|||
},
|
||||
TestGroupResult {
|
||||
"name": "Provider",
|
||||
"tests": Array [
|
||||
"tests": [
|
||||
TestCaseResult {
|
||||
"error": undefined,
|
||||
"name": "default",
|
||||
|
|
@ -569,7 +569,7 @@ Unexpected number of calls
|
|||
},
|
||||
TestGroupResult {
|
||||
"name": "ProxyProvider",
|
||||
"tests": Array [
|
||||
"tests": [
|
||||
TestCaseResult {
|
||||
"error": undefined,
|
||||
"name": "0",
|
||||
|
|
@ -616,7 +616,7 @@ Unexpected number of calls
|
|||
},
|
||||
TestGroupResult {
|
||||
"name": "MultiProvider",
|
||||
"tests": Array [
|
||||
"tests": [
|
||||
TestCaseResult {
|
||||
"error": undefined,
|
||||
"name": "with 1 ChangeNotifierProvider default",
|
||||
|
|
@ -690,10 +690,10 @@ Unexpected number of calls
|
|||
"totalTime": undefined,
|
||||
},
|
||||
TestSuiteResult {
|
||||
"groups": Array [
|
||||
"groups": [
|
||||
TestGroupResult {
|
||||
"name": "MultiProvider",
|
||||
"tests": Array [
|
||||
"tests": [
|
||||
TestCaseResult {
|
||||
"error": undefined,
|
||||
"name": "throw if providers is null",
|
||||
|
|
@ -719,10 +719,10 @@ Unexpected number of calls
|
|||
"totalTime": undefined,
|
||||
},
|
||||
TestSuiteResult {
|
||||
"groups": Array [
|
||||
"groups": [
|
||||
TestGroupResult {
|
||||
"name": "",
|
||||
"tests": Array [
|
||||
"tests": [
|
||||
TestCaseResult {
|
||||
"error": undefined,
|
||||
"name": "works with MultiProvider",
|
||||
|
|
@ -763,7 +763,7 @@ Unexpected number of calls
|
|||
},
|
||||
TestGroupResult {
|
||||
"name": "StreamProvider()",
|
||||
"tests": Array [
|
||||
"tests": [
|
||||
TestCaseResult {
|
||||
"error": undefined,
|
||||
"name": "create and dispose stream with builder",
|
||||
|
|
@ -783,10 +783,10 @@ Unexpected number of calls
|
|||
"totalTime": undefined,
|
||||
},
|
||||
TestSuiteResult {
|
||||
"groups": Array [
|
||||
"groups": [
|
||||
TestGroupResult {
|
||||
"name": "",
|
||||
"tests": Array [
|
||||
"tests": [
|
||||
TestCaseResult {
|
||||
"error": undefined,
|
||||
"name": "watch in layoutbuilder",
|
||||
|
|
@ -827,7 +827,7 @@ Unexpected number of calls
|
|||
},
|
||||
TestGroupResult {
|
||||
"name": "BuildContext",
|
||||
"tests": Array [
|
||||
"tests": [
|
||||
TestCaseResult {
|
||||
"error": undefined,
|
||||
"name": "internal selected value is updated",
|
||||
|
|
@ -985,10 +985,10 @@ Unexpected number of calls
|
|||
"totalTime": undefined,
|
||||
},
|
||||
TestSuiteResult {
|
||||
"groups": Array [
|
||||
"groups": [
|
||||
TestGroupResult {
|
||||
"name": "",
|
||||
"tests": Array [
|
||||
"tests": [
|
||||
TestCaseResult {
|
||||
"error": undefined,
|
||||
"name": "ReassembleHandler",
|
||||
|
|
@ -1014,10 +1014,10 @@ Unexpected number of calls
|
|||
"totalTime": undefined,
|
||||
},
|
||||
TestSuiteResult {
|
||||
"groups": Array [
|
||||
"groups": [
|
||||
TestGroupResult {
|
||||
"name": "",
|
||||
"tests": Array [
|
||||
"tests": [
|
||||
TestCaseResult {
|
||||
"error": undefined,
|
||||
"name": "works with MultiProvider",
|
||||
|
|
@ -1076,7 +1076,7 @@ Unexpected number of calls
|
|||
},
|
||||
TestGroupResult {
|
||||
"name": "FutureProvider()",
|
||||
"tests": Array [
|
||||
"tests": [
|
||||
TestCaseResult {
|
||||
"error": undefined,
|
||||
"name": "crashes if builder is null",
|
||||
|
|
@ -1090,10 +1090,10 @@ Unexpected number of calls
|
|||
"totalTime": undefined,
|
||||
},
|
||||
TestSuiteResult {
|
||||
"groups": Array [
|
||||
"groups": [
|
||||
TestGroupResult {
|
||||
"name": "",
|
||||
"tests": Array [
|
||||
"tests": [
|
||||
TestCaseResult {
|
||||
"error": undefined,
|
||||
"name": "works with MultiProvider",
|
||||
|
|
@ -1104,7 +1104,7 @@ Unexpected number of calls
|
|||
},
|
||||
TestGroupResult {
|
||||
"name": "Provider.of",
|
||||
"tests": Array [
|
||||
"tests": [
|
||||
TestCaseResult {
|
||||
"error": undefined,
|
||||
"name": "throws if T is dynamic",
|
||||
|
|
@ -1139,7 +1139,7 @@ Unexpected number of calls
|
|||
},
|
||||
TestGroupResult {
|
||||
"name": "Provider",
|
||||
"tests": Array [
|
||||
"tests": [
|
||||
TestCaseResult {
|
||||
"error": undefined,
|
||||
"name": "throws if the provided value is a Listenable/Stream",
|
||||
|
|
@ -1177,10 +1177,10 @@ Unexpected number of calls
|
|||
"totalTime": undefined,
|
||||
},
|
||||
TestSuiteResult {
|
||||
"groups": Array [
|
||||
"groups": [
|
||||
TestGroupResult {
|
||||
"name": "",
|
||||
"tests": Array [
|
||||
"tests": [
|
||||
TestCaseResult {
|
||||
"error": undefined,
|
||||
"name": "regression test #377",
|
||||
|
|
@ -1371,7 +1371,7 @@ Unexpected number of calls
|
|||
},
|
||||
TestGroupResult {
|
||||
"name": "diagnostics",
|
||||
"tests": Array [
|
||||
"tests": [
|
||||
TestCaseResult {
|
||||
"error": undefined,
|
||||
"name": "InheritedProvider.value",
|
||||
|
|
@ -1406,7 +1406,7 @@ Unexpected number of calls
|
|||
},
|
||||
TestGroupResult {
|
||||
"name": "InheritedProvider.value()",
|
||||
"tests": Array [
|
||||
"tests": [
|
||||
TestCaseResult {
|
||||
"error": undefined,
|
||||
"name": "markNeedsNotifyDependents during startListening is noop",
|
||||
|
|
@ -1459,7 +1459,7 @@ Unexpected number of calls
|
|||
},
|
||||
TestGroupResult {
|
||||
"name": "InheritedProvider()",
|
||||
"tests": Array [
|
||||
"tests": [
|
||||
TestCaseResult {
|
||||
"error": undefined,
|
||||
"name": "hasValue",
|
||||
|
|
@ -1614,7 +1614,7 @@ Unexpected number of calls
|
|||
},
|
||||
TestGroupResult {
|
||||
"name": "DeferredInheritedProvider.value()",
|
||||
"tests": Array [
|
||||
"tests": [
|
||||
TestCaseResult {
|
||||
"error": undefined,
|
||||
"name": "hasValue",
|
||||
|
|
@ -1667,7 +1667,7 @@ Unexpected number of calls
|
|||
},
|
||||
TestGroupResult {
|
||||
"name": "DeferredInheritedProvider()",
|
||||
"tests": Array [
|
||||
"tests": [
|
||||
TestCaseResult {
|
||||
"error": undefined,
|
||||
"name": "create can't call inherited widgets",
|
||||
|
|
@ -1699,10 +1699,10 @@ Unexpected number of calls
|
|||
"totalTime": undefined,
|
||||
},
|
||||
TestSuiteResult {
|
||||
"groups": Array [
|
||||
"groups": [
|
||||
TestGroupResult {
|
||||
"name": "ListenableProxyProvider",
|
||||
"tests": Array [
|
||||
"tests": [
|
||||
TestCaseResult {
|
||||
"error": undefined,
|
||||
"name": "throws if update is missing",
|
||||
|
|
@ -1743,7 +1743,7 @@ Unexpected number of calls
|
|||
},
|
||||
TestGroupResult {
|
||||
"name": "ListenableProxyProvider variants",
|
||||
"tests": Array [
|
||||
"tests": [
|
||||
TestCaseResult {
|
||||
"error": undefined,
|
||||
"name": "ListenableProxyProvider",
|
||||
|
|
@ -1787,10 +1787,10 @@ Unexpected number of calls
|
|||
"totalTime": undefined,
|
||||
},
|
||||
TestSuiteResult {
|
||||
"groups": Array [
|
||||
"groups": [
|
||||
TestGroupResult {
|
||||
"name": "",
|
||||
"tests": Array [
|
||||
"tests": [
|
||||
TestCaseResult {
|
||||
"error": undefined,
|
||||
"name": "asserts that builder/selector are not null",
|
||||
|
|
@ -1900,10 +1900,10 @@ Unexpected number of calls
|
|||
"totalTime": undefined,
|
||||
},
|
||||
TestSuiteResult {
|
||||
"groups": Array [
|
||||
"groups": [
|
||||
TestGroupResult {
|
||||
"name": "",
|
||||
"tests": Array [
|
||||
"tests": [
|
||||
TestCaseResult {
|
||||
"error": undefined,
|
||||
"name": "asserts",
|
||||
|
|
@ -1935,10 +1935,10 @@ Unexpected number of calls
|
|||
"totalTime": undefined,
|
||||
},
|
||||
TestSuiteResult {
|
||||
"groups": Array [
|
||||
"groups": [
|
||||
TestGroupResult {
|
||||
"name": "ProxyProvider",
|
||||
"tests": Array [
|
||||
"tests": [
|
||||
TestCaseResult {
|
||||
"error": undefined,
|
||||
"name": "throws if the provided value is a Listenable/Stream",
|
||||
|
|
@ -2009,7 +2009,7 @@ Unexpected number of calls
|
|||
},
|
||||
TestGroupResult {
|
||||
"name": "ProxyProvider variants",
|
||||
"tests": Array [
|
||||
"tests": [
|
||||
TestCaseResult {
|
||||
"error": undefined,
|
||||
"name": "ProxyProvider2",
|
||||
|
|
|
|||
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
File diff suppressed because it is too large
Load diff
44
__tests__/__snapshots__/swift-xunit.test.ts.snap
Normal file
44
__tests__/__snapshots__/swift-xunit.test.ts.snap
Normal file
|
|
@ -0,0 +1,44 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`swift-xunit tests report from swift test results matches snapshot 1`] = `
|
||||
TestRunResult {
|
||||
"path": "fixtures/swift-xunit.xml",
|
||||
"suites": [
|
||||
TestSuiteResult {
|
||||
"groups": [
|
||||
TestGroupResult {
|
||||
"name": "AcmeLibTests.AcmeLibTests",
|
||||
"tests": [
|
||||
TestCaseResult {
|
||||
"error": undefined,
|
||||
"name": "test_always_pass",
|
||||
"result": "success",
|
||||
"time": 36.386333,
|
||||
},
|
||||
TestCaseResult {
|
||||
"error": undefined,
|
||||
"name": "test_always_skip",
|
||||
"result": "success",
|
||||
"time": 92.039167,
|
||||
},
|
||||
TestCaseResult {
|
||||
"error": {
|
||||
"details": undefined,
|
||||
"line": undefined,
|
||||
"message": undefined,
|
||||
"path": undefined,
|
||||
},
|
||||
"name": "test_always_fail",
|
||||
"result": "failed",
|
||||
"time": 92.05175,
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
"name": "TestResults",
|
||||
"totalTime": 220.47725000000003,
|
||||
},
|
||||
],
|
||||
"totalTime": undefined,
|
||||
}
|
||||
`;
|
||||
7
__tests__/fixtures/external/jest/jest-react-component-test-results.xml
vendored
Normal file
7
__tests__/fixtures/external/jest/jest-react-component-test-results.xml
vendored
Normal file
|
|
@ -0,0 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<testsuites name="React components test" tests="1" failures="0" errors="0" time="1.0">
|
||||
<testsuite name="<Component />" errors="0" failures="0" skipped="0" timestamp="2021-01-24T19:21:45" time="0.798" tests="1">
|
||||
<testcase classname="" name="<Component /> should render properly" time="0.704">
|
||||
</testcase>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
12
__tests__/fixtures/swift-xunit.xml
Normal file
12
__tests__/fixtures/swift-xunit.xml
Normal file
|
|
@ -0,0 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<testsuites>
|
||||
<testsuite name="TestResults" errors="0" tests="3" failures="1" time="0.22047725">
|
||||
<testcase classname="AcmeLibTests.AcmeLibTests" name="test_always_pass" time="0.036386333">
|
||||
</testcase>
|
||||
<testcase classname="AcmeLibTests.AcmeLibTests" name="test_always_skip" time="0.092039167">
|
||||
</testcase>
|
||||
<testcase classname="AcmeLibTests.AcmeLibTests" name="test_always_fail" time="0.09205175">
|
||||
<failure message="failed"></failure>
|
||||
</testcase>
|
||||
</testsuite>
|
||||
</testsuites>
|
||||
|
|
@ -82,4 +82,27 @@ describe('jest-junit tests', () => {
|
|||
fs.mkdirSync(path.dirname(outputPath), {recursive: true})
|
||||
fs.writeFileSync(outputPath, report)
|
||||
})
|
||||
|
||||
it('report from #235 testing react components named <ComponentName />', async () => {
|
||||
const fixturePath = path.join(__dirname, 'fixtures', 'external', 'jest', 'jest-react-component-test-results.xml')
|
||||
const trackedFilesPath = path.join(__dirname, 'fixtures', 'external', 'jest', 'files.txt')
|
||||
const outputPath = path.join(__dirname, '__outputs__', 'jest-react-component-test-results.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
|
||||
//workDir: '/home/dorny/dorny/jest/'
|
||||
}
|
||||
|
||||
const parser = new JestJunitParser(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)
|
||||
})
|
||||
})
|
||||
|
|
|
|||
30
__tests__/swift-xunit.test.ts
Normal file
30
__tests__/swift-xunit.test.ts
Normal file
|
|
@ -0,0 +1,30 @@
|
|||
import * as fs from 'fs'
|
||||
import * as path from 'path'
|
||||
|
||||
import {SwiftXunitParser} from '../src/parsers/swift-xunit/swift-xunit-parser'
|
||||
import {ParseOptions} from '../src/test-parser'
|
||||
import {getReport} from '../src/report/get-report'
|
||||
import {normalizeFilePath} from '../src/utils/path-utils'
|
||||
|
||||
describe('swift-xunit tests', () => {
|
||||
it('report from swift test results matches snapshot', async () => {
|
||||
const fixturePath = path.join(__dirname, 'fixtures', 'swift-xunit.xml')
|
||||
const outputPath = path.join(__dirname, '__outputs__', 'swift-xunit.md')
|
||||
const filePath = normalizeFilePath(path.relative(__dirname, fixturePath))
|
||||
const fileContent = fs.readFileSync(fixturePath, {encoding: 'utf8'})
|
||||
|
||||
const trackedFiles = ['Package.swift', 'Sources/AcmeLib/AcmeLib.swift', 'Tests/AcmeLibTests/AcmeLibTests.swift']
|
||||
const opts: ParseOptions = {
|
||||
parseErrors: true,
|
||||
trackedFiles
|
||||
}
|
||||
|
||||
const parser = new SwiftXunitParser(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