Skip to content

Commit

Permalink
Fix code formatting and update snapshot for dotnet-unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Jozef Izso committed Jun 25, 2024
1 parent ce340de commit c40b69f
Show file tree
Hide file tree
Showing 3 changed files with 14 additions and 15 deletions.
26 changes: 13 additions & 13 deletions __tests__/__snapshots__/dotnet-nunit.test.ts.snap
Original file line number Diff line number Diff line change
Expand Up @@ -3,21 +3,21 @@
exports[`dotnet-nunit tests report from ./reports/dotnet test results matches snapshot 1`] = `
TestRunResult {
"path": "fixtures/dotnet-nunit.xml",
"suites": Array [
"suites": [
TestSuiteResult {
"groups": Array [
"groups": [
TestGroupResult {
"name": "CalculatorTests",
"tests": Array [
"tests": [
TestCaseResult {
"error": undefined,
"name": "Is_Even_Number(2)",
"result": "success",
"time": 0.622,
},
TestCaseResult {
"error": Object {
"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
"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
",
"line": undefined,
"message": " Expected: True
Expand All @@ -30,9 +30,9 @@ TestRunResult {
"time": 1.098,
},
TestCaseResult {
"error": Object {
"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",
"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
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,
"message": "System.DivideByZeroException : Attempted to divide by zero.",
"path": undefined,
Expand All @@ -42,8 +42,8 @@ TestRunResult {
"time": 22.805,
},
TestCaseResult {
"error": Object {
"details": " at DotnetTests.XUnitTests.CalculatorTests.Exception_In_Test() in C:\\\\Users\\\\Michal\\\\Workspace\\\\dorny\\\\test-reporter\\\\reports\\\\dotnet\\\\DotnetTests.NUnitV3Tests\\\\CalculatorTests.cs:line 39",
"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",
"line": undefined,
"message": "System.Exception : Test",
"path": undefined,
Expand All @@ -53,8 +53,8 @@ TestRunResult {
"time": 0.528,
},
TestCaseResult {
"error": Object {
"details": " at DotnetTests.XUnitTests.CalculatorTests.Failing_Test() in C:\\\\Users\\\\Michal\\\\Workspace\\\\dorny\\\\test-reporter\\\\reports\\\\dotnet\\\\DotnetTests.NUnitV3Tests\\\\CalculatorTests.cs:line 27
"error": {
"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,
"message": " Expected: 3
Expand Down Expand Up @@ -85,7 +85,7 @@ TestRunResult {
"time": 0.398,
},
TestCaseResult {
"error": Object {
"error": {
"details": "",
"line": undefined,
"message": "",
Expand Down
1 change: 0 additions & 1 deletion src/parsers/rspec-json/rspec-json-parser.ts
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
import { Console } from 'console'
import {ParseOptions, TestParser} from '../../test-parser'
import {
TestCaseError,
Expand Down
2 changes: 1 addition & 1 deletion src/parsers/rspec-json/rspec-json-types.ts
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export interface RspecExample {
exception?: RspecException
}

type TestStatus = 'passed' | 'failed' | 'pending';
type TestStatus = 'passed' | 'failed' | 'pending'

export interface RspecException {
class: string
Expand Down

0 comments on commit c40b69f

Please sign in to comment.