Fix code formatting and update snapshot for dotnet-unit tests

This commit is contained in:
Jozef Izso 2024-06-25 14:01:36 +02:00
parent ce340de8b9
commit c40b69fc4a
3 changed files with 14 additions and 15 deletions

View file

@ -3,12 +3,12 @@
exports[`dotnet-nunit tests report from ./reports/dotnet test results matches snapshot 1`] = ` exports[`dotnet-nunit tests report from ./reports/dotnet test results matches snapshot 1`] = `
TestRunResult { TestRunResult {
"path": "fixtures/dotnet-nunit.xml", "path": "fixtures/dotnet-nunit.xml",
"suites": Array [ "suites": [
TestSuiteResult { TestSuiteResult {
"groups": Array [ "groups": [
TestGroupResult { TestGroupResult {
"name": "CalculatorTests", "name": "CalculatorTests",
"tests": Array [ "tests": [
TestCaseResult { TestCaseResult {
"error": undefined, "error": undefined,
"name": "Is_Even_Number(2)", "name": "Is_Even_Number(2)",
@ -16,8 +16,8 @@ TestRunResult {
"time": 0.622, "time": 0.622,
}, },
TestCaseResult { TestCaseResult {
"error": Object { "error": {
"details": " at DotnetTests.XUnitTests.CalculatorTests.Is_Even_Number(Int32 i) in C:\\\\Users\\\\Michal\\\\Workspace\\\\dorny\\\\test-reporter\\\\reports\\\\dotnet\\\\DotnetTests.NUnitV3Tests\\\\CalculatorTests.cs:line 61 "details": " at DotnetTests.XUnitTests.CalculatorTests.Is_Even_Number(Int32 i) in C:\\Users\\Michal\\Workspace\\dorny\\test-reporter\\reports\\dotnet\\DotnetTests.NUnitV3Tests\\CalculatorTests.cs:line 61
", ",
"line": undefined, "line": undefined,
"message": " Expected: True "message": " Expected: True
@ -30,9 +30,9 @@ TestRunResult {
"time": 1.098, "time": 1.098,
}, },
TestCaseResult { TestCaseResult {
"error": Object { "error": {
"details": " at DotnetTests.Unit.Calculator.Div(Int32 a, Int32 b) in C:\\\\Users\\\\Michal\\\\Workspace\\\\dorny\\\\test-reporter\\\\reports\\\\dotnet\\\\DotnetTests.Unit\\\\Calculator.cs:line 9 "details": " at DotnetTests.Unit.Calculator.Div(Int32 a, Int32 b) in C:\\Users\\Michal\\Workspace\\dorny\\test-reporter\\reports\\dotnet\\DotnetTests.Unit\\Calculator.cs:line 9
at DotnetTests.XUnitTests.CalculatorTests.Exception_In_TargetTest() in C:\\\\Users\\\\Michal\\\\Workspace\\\\dorny\\\\test-reporter\\\\reports\\\\dotnet\\\\DotnetTests.NUnitV3Tests\\\\CalculatorTests.cs:line 33", at DotnetTests.XUnitTests.CalculatorTests.Exception_In_TargetTest() in C:\\Users\\Michal\\Workspace\\dorny\\test-reporter\\reports\\dotnet\\DotnetTests.NUnitV3Tests\\CalculatorTests.cs:line 33",
"line": undefined, "line": undefined,
"message": "System.DivideByZeroException : Attempted to divide by zero.", "message": "System.DivideByZeroException : Attempted to divide by zero.",
"path": undefined, "path": undefined,
@ -42,8 +42,8 @@ TestRunResult {
"time": 22.805, "time": 22.805,
}, },
TestCaseResult { TestCaseResult {
"error": Object { "error": {
"details": " at DotnetTests.XUnitTests.CalculatorTests.Exception_In_Test() in C:\\\\Users\\\\Michal\\\\Workspace\\\\dorny\\\\test-reporter\\\\reports\\\\dotnet\\\\DotnetTests.NUnitV3Tests\\\\CalculatorTests.cs:line 39", "details": " at DotnetTests.XUnitTests.CalculatorTests.Exception_In_Test() in C:\\Users\\Michal\\Workspace\\dorny\\test-reporter\\reports\\dotnet\\DotnetTests.NUnitV3Tests\\CalculatorTests.cs:line 39",
"line": undefined, "line": undefined,
"message": "System.Exception : Test", "message": "System.Exception : Test",
"path": undefined, "path": undefined,
@ -53,8 +53,8 @@ TestRunResult {
"time": 0.528, "time": 0.528,
}, },
TestCaseResult { TestCaseResult {
"error": Object { "error": {
"details": " at DotnetTests.XUnitTests.CalculatorTests.Failing_Test() in C:\\\\Users\\\\Michal\\\\Workspace\\\\dorny\\\\test-reporter\\\\reports\\\\dotnet\\\\DotnetTests.NUnitV3Tests\\\\CalculatorTests.cs:line 27 "details": " at DotnetTests.XUnitTests.CalculatorTests.Failing_Test() in C:\\Users\\Michal\\Workspace\\dorny\\test-reporter\\reports\\dotnet\\DotnetTests.NUnitV3Tests\\CalculatorTests.cs:line 27
", ",
"line": undefined, "line": undefined,
"message": " Expected: 3 "message": " Expected: 3
@ -85,7 +85,7 @@ TestRunResult {
"time": 0.398, "time": 0.398,
}, },
TestCaseResult { TestCaseResult {
"error": Object { "error": {
"details": "", "details": "",
"line": undefined, "line": undefined,
"message": "", "message": "",

View file

@ -1,4 +1,3 @@
import { Console } from 'console'
import {ParseOptions, TestParser} from '../../test-parser' import {ParseOptions, TestParser} from '../../test-parser'
import { import {
TestCaseError, TestCaseError,

View file

@ -17,7 +17,7 @@ export interface RspecExample {
exception?: RspecException exception?: RspecException
} }
type TestStatus = 'passed' | 'failed' | 'pending'; type TestStatus = 'passed' | 'failed' | 'pending'
export interface RspecException { export interface RspecException {
class: string class: string