mirror of
https://github.com/dorny/test-reporter.git
synced 2025-12-16 06:17:10 +01:00
Add Golang test parser
This commit is contained in:
parent
d33ca7294f
commit
7745ff0ec1
10 changed files with 451 additions and 0 deletions
108
__tests__/__snapshots__/golang-json.test.ts.snap
Normal file
108
__tests__/__snapshots__/golang-json.test.ts.snap
Normal file
|
|
@ -0,0 +1,108 @@
|
|||
// Jest Snapshot v1, https://goo.gl/fbAQLP
|
||||
|
||||
exports[`golang-json tests report from ./reports/dotnet test results matches snapshot 1`] = `
|
||||
TestRunResult {
|
||||
"path": "fixtures/golang-json.json",
|
||||
"suites": [
|
||||
TestSuiteResult {
|
||||
"groups": [
|
||||
TestGroupResult {
|
||||
"name": null,
|
||||
"tests": [
|
||||
TestCaseResult {
|
||||
"error": undefined,
|
||||
"name": "TestPassing",
|
||||
"result": "success",
|
||||
"time": 90,
|
||||
},
|
||||
TestCaseResult {
|
||||
"error": {
|
||||
"details": "calculator_test.go:19: expected 1+1 = 3, got 2
|
||||
",
|
||||
"message": "calculator_test.go:19: expected 1+1 = 3, got 2
|
||||
",
|
||||
},
|
||||
"name": "TestFailing",
|
||||
"result": "failed",
|
||||
"time": 760,
|
||||
},
|
||||
TestCaseResult {
|
||||
"error": {
|
||||
"details": "calculator_test.go:71: caught panic: runtime error: integer divide by zero
|
||||
",
|
||||
"message": "calculator_test.go:71: caught panic: runtime error: integer divide by zero
|
||||
",
|
||||
},
|
||||
"name": "TestPanicInsideFunction",
|
||||
"result": "failed",
|
||||
"time": 0,
|
||||
},
|
||||
TestCaseResult {
|
||||
"error": {
|
||||
"details": "calculator_test.go:71: caught panic: bad stuff
|
||||
",
|
||||
"message": "calculator_test.go:71: caught panic: bad stuff
|
||||
",
|
||||
},
|
||||
"name": "TestPanicInsideTest",
|
||||
"result": "failed",
|
||||
"time": 0,
|
||||
},
|
||||
TestCaseResult {
|
||||
"error": {
|
||||
"details": "calculator_test.go:45: skipping test
|
||||
",
|
||||
"message": "calculator_test.go:45: skipping test
|
||||
",
|
||||
},
|
||||
"name": "TestSkipped",
|
||||
"result": "skipped",
|
||||
"time": 110,
|
||||
},
|
||||
TestCaseResult {
|
||||
"error": {
|
||||
"details": "",
|
||||
"message": "",
|
||||
},
|
||||
"name": "TestCases",
|
||||
"result": "failed",
|
||||
"time": 1620,
|
||||
},
|
||||
],
|
||||
},
|
||||
TestGroupResult {
|
||||
"name": "TestCases",
|
||||
"tests": [
|
||||
TestCaseResult {
|
||||
"error": undefined,
|
||||
"name": "1_+_2_=_3",
|
||||
"result": "success",
|
||||
"time": 540,
|
||||
},
|
||||
TestCaseResult {
|
||||
"error": undefined,
|
||||
"name": "4_+_7_=_11",
|
||||
"result": "success",
|
||||
"time": 540,
|
||||
},
|
||||
TestCaseResult {
|
||||
"error": {
|
||||
"details": "calculator_test.go:62: expected 2 + 3 = 4, got 5
|
||||
",
|
||||
"message": "calculator_test.go:62: expected 2 + 3 = 4, got 5
|
||||
",
|
||||
},
|
||||
"name": "2_+_3_=_4",
|
||||
"result": "failed",
|
||||
"time": 530,
|
||||
},
|
||||
],
|
||||
},
|
||||
],
|
||||
"name": "_/home/james_t/git/test-reporter/reports/go",
|
||||
"totalTime": undefined,
|
||||
},
|
||||
],
|
||||
"totalTime": undefined,
|
||||
}
|
||||
`;
|
||||
Loading…
Add table
Add a link
Reference in a new issue