@@ -41,13 +41,15 @@ class TestEventStream {
41
41
42
42
suite ( "SwiftTestingOutputParser Suite" , ( ) => {
43
43
let outputParser : SwiftTestingOutputParser ;
44
+ let testRunState : TestRunState ;
44
45
45
46
beforeEach ( ( ) => {
46
47
outputParser = new SwiftTestingOutputParser (
47
48
( ) => { } ,
48
49
( ) => { } ,
49
50
( ) => { }
50
51
) ;
52
+ testRunState = new TestRunState ( true ) ;
51
53
} ) ;
52
54
53
55
type ExtractPayload < T > = T extends { payload : infer E } ? E : never ;
@@ -76,7 +78,6 @@ suite("SwiftTestingOutputParser Suite", () => {
76
78
}
77
79
78
80
test ( "Passed test" , async ( ) => {
79
- const testRunState = new TestRunState ( [ "MyTests.MyTests/testPass()" ] , true ) ;
80
81
const events = new TestEventStream ( [
81
82
testEvent ( "runStarted" ) ,
82
83
testEvent ( "testCaseStarted" , "MyTests.MyTests/testPass()" ) ,
@@ -97,7 +98,6 @@ suite("SwiftTestingOutputParser Suite", () => {
97
98
} ) ;
98
99
99
100
test ( "Skipped test" , async ( ) => {
100
- const testRunState = new TestRunState ( [ "MyTests.MyTests/testSkip()" ] , true ) ;
101
101
const events = new TestEventStream ( [
102
102
testEvent ( "runStarted" ) ,
103
103
testEvent ( "testSkipped" , "MyTests.MyTests/testSkip()" ) ,
@@ -116,7 +116,6 @@ suite("SwiftTestingOutputParser Suite", () => {
116
116
} ) ;
117
117
118
118
async function performTestFailure ( messages : EventMessage [ ] ) {
119
- const testRunState = new TestRunState ( [ "MyTests.MyTests/testFail()" ] , true ) ;
120
119
const issueLocation = {
121
120
_filePath : "file:///some/file.swift" ,
122
121
line : 1 ,
@@ -174,7 +173,6 @@ suite("SwiftTestingOutputParser Suite", () => {
174
173
} ) ;
175
174
176
175
test ( "Parameterized test" , async ( ) => {
177
- const testRunState = new TestRunState ( [ "MyTests.MyTests/testParameterized()" ] , true ) ;
178
176
const events = new TestEventStream ( [
179
177
{
180
178
kind : "test" ,
@@ -270,10 +268,6 @@ suite("SwiftTestingOutputParser Suite", () => {
270
268
} ) ;
271
269
272
270
test ( "Output is captured" , async ( ) => {
273
- const testRunState = new TestRunState (
274
- [ "MyTests.MyTests/testOutput()" , "MyTests.MyTests/testOutput2()" ] ,
275
- true
276
- ) ;
277
271
const symbol = TestSymbol . pass ;
278
272
const makeEvent = ( kind : ExtractPayload < EventRecord > [ "kind" ] , testId ?: string ) =>
279
273
testEvent ( kind , testId , [ { text : kind , symbol } ] ) ;
0 commit comments