@@ -42,6 +42,7 @@ import {
42
42
type SmokeConfig ,
43
43
awaitedSequences ,
44
44
semaphore ,
45
+ filterTestPlanning ,
45
46
} from "pardon/running" ;
46
47
47
48
let nextTestRunId = Date . now ( ) ;
@@ -323,7 +324,7 @@ async function initializePardonAndLoadSamples(
323
324
324
325
const testing = loadTestEngine ( app ) ;
325
326
326
- await initTrackingEnvironment ( { } ) ;
327
+ await initTrackingEnvironment ( ) ;
327
328
328
329
return { app, samples, testing } ;
329
330
}
@@ -593,8 +594,9 @@ const handlers = {
593
594
{ smoke, filter } : { smoke ?: SmokeConfig ; filter ?: string [ ] } ,
594
595
) {
595
596
const { testing } = await ready ;
596
- const testplan = await ( await testing ) ?. testplanner ( environment , smoke , ...( filter || [ ] ) ) ;
597
- return testplan . cases . map ( ( { testenv, testcase } ) => ( { testenv, testcase } ) ) ;
597
+ const planning = await ( await testing ) ! . testplanner ( environment , smoke , ...( filter || [ ] ) ) ;
598
+
599
+ return filterTestPlanning ( planning ) ;
598
600
} ,
599
601
async executeTestcases (
600
602
testenv : Record < string , unknown > ,
@@ -612,7 +614,7 @@ const handlers = {
612
614
...testcases ,
613
615
) ;
614
616
615
- const tests = ( await testplan ) ?. cases ;
617
+ const tests = filterTestPlanning ( testplan ) ;
616
618
617
619
parentPort ! . postMessage (
618
620
ship ( {
@@ -633,7 +635,7 @@ const handlers = {
633
635
return currentTestRun . run ( testRun , ( ) =>
634
636
all_disconnected (
635
637
tests . map (
636
- async ( { environment : initEnv , test, testcase } ) =>
638
+ async ( { testenv : initEnv , test, testcase } ) =>
637
639
await concurrently ( ( ) =>
638
640
disconnected ( async ( ) => {
639
641
let errors : unknown [ ] = [ ] ;
@@ -662,7 +664,7 @@ const handlers = {
662
664
} catch ( error ) {
663
665
notifyFastFailed ( error ) ;
664
666
errors . push ( error ) ;
665
- emitEnv = { ...environment } ;
667
+ emitEnv = { ...testenv } ;
666
668
667
669
return { testcase, errors, environment : emitEnv } ;
668
670
} finally {
0 commit comments