@@ -11,7 +11,6 @@ import {TestFile, TestRunStack, TestSuite } from './conductor/TestRun'
1111import { TestRunIterator } from './conductor/TestRunIterator'
1212import { PackageConfigResolver } from './loader/PackageConfigResolver'
1313import { CjsTransformer } from './loader/CjsTransformer'
14- import { ConsoleReporter } from './reporter/ConsoleReporter'
1514import { FsLoader } from './loader/FsLoader'
1615import { NodeTestConductor } from './conductor/NodeTestConductor'
1716import { ChromeTestConductor } from './conductor/ChromeTestConductor'
@@ -278,7 +277,6 @@ export async function setupToolboxTester(
278277 testRunIterator = TestRunIterator . iterateSuitesByConductors ,
279278 watcherFactory = ( ) => new FsWatcher ( ) ,
280279 mapPathsToTestFiles = defaults . mapPathsToTestFiles ,
281- connectConsoleReporter = true ,
282280 setExitCode = ! ! process . env . CI ,
283281 } : {
284282 /**
@@ -321,12 +319,6 @@ export async function setupToolboxTester(
321319 * (the URLs and titles of the {@link TestSuite}s).
322320 */
323321 mapPathsToTestFiles ?: ( fileserverUrl : URL , subPaths : Iterable < string > ) => Iterable < TestFile >
324- /**
325- * Automatically connect the default {@link ConsoleReporter} to test runs created on the {@link TestRunManager}.
326- *
327- * Defaults to `true`.
328- */
329- connectConsoleReporter ?: boolean
330322 /**
331323 * Set `process.exitCode` according to the test run results.
332324 *
@@ -360,12 +352,6 @@ export async function setupToolboxTester(
360352 conductors . push ( c ( runner . url ) )
361353 }
362354
363- const consoleReporter = new ConsoleReporter ( )
364- if ( connectConsoleReporter ) {
365- manager . addListener ( 'create' , ( { run} ) => consoleReporter . connect ( run ) )
366- manager . addListener ( 'done' , ( { run} ) => consoleReporter . disconnect ( run ) )
367- }
368-
369355 const tester = new Tester (
370356 manager ,
371357 conductors ,
@@ -376,36 +362,6 @@ export async function setupToolboxTester(
376362 setExitCode ,
377363 )
378364
379- const start = async ( {
380- persistent = ! process . env . CI ,
381- } : {
382- persistent ?: boolean
383- } = { } ) => {
384- await tester . start ( )
385-
386- if ( ! persistent ) {
387- void close ( )
388- }
389- }
390-
391- const close = async ( closeConductors = true ) => {
392- await tester . stop ( )
393-
394- await watcher . close ( )
395-
396- const a = [ ]
397- if ( closeConductors ) {
398- for ( const c of conductors ) {
399- a . push ( c . close ( ) )
400- }
401- a . push ( runner . close ( ) )
402- }
403- a . push ( fileServer . close ( ) )
404- await Promise . allSettled ( a )
405-
406- await tester [ Symbol . asyncDispose ] ( )
407- }
408-
409365 const cli = new TesterCli ( tester )
410366 cli . onClose ( async ( ) => {
411367 await watcher . close ( )
@@ -448,9 +404,6 @@ export async function setupToolboxTester(
448404 fileProvider,
449405 fileServer,
450406 watcher,
451- consoleReporter,
452407 connectCoverageReporter,
453- start,
454- close,
455408 }
456409}
0 commit comments