register ts/esm loader
This commit is contained in:
parent
92533ce64d
commit
b9173b05ef
|
|
@ -197,6 +197,8 @@ async function runTests(args: string[], opts: { [key: string]: any }) {
|
||||||
}
|
}
|
||||||
);
|
);
|
||||||
await stopProfiling('runner');
|
await stopProfiling('runner');
|
||||||
|
if (status === 'restarted')
|
||||||
|
return;
|
||||||
const exitCode = status === 'interrupted' ? 130 : (status === 'passed' ? 0 : 1);
|
const exitCode = status === 'interrupted' ? 130 : (status === 'passed' ? 0 : 1);
|
||||||
gracefullyProcessExitDoNotHang(exitCode);
|
gracefullyProcessExitDoNotHang(exitCode);
|
||||||
return;
|
return;
|
||||||
|
|
|
||||||
|
|
@ -27,6 +27,7 @@ import { TestServerDispatcher } from './testServer';
|
||||||
import { EventEmitter } from 'stream';
|
import { EventEmitter } from 'stream';
|
||||||
import { type TestServerTransport, TestServerConnection } from '../isomorphic/testServerConnection';
|
import { type TestServerTransport, TestServerConnection } from '../isomorphic/testServerConnection';
|
||||||
import { TeleSuiteUpdater } from '../isomorphic/teleSuiteUpdater';
|
import { TeleSuiteUpdater } from '../isomorphic/teleSuiteUpdater';
|
||||||
|
import { restartWithExperimentalTsEsm } from '../common/configLoader';
|
||||||
|
|
||||||
class InMemoryTransport extends EventEmitter implements TestServerTransport {
|
class InMemoryTransport extends EventEmitter implements TestServerTransport {
|
||||||
public readonly _send: (data: string) => void;
|
public readonly _send: (data: string) => void;
|
||||||
|
|
@ -67,7 +68,10 @@ interface WatchModeOptions {
|
||||||
grep?: string;
|
grep?: string;
|
||||||
}
|
}
|
||||||
|
|
||||||
export async function runWatchModeLoop(configLocation: ConfigLocation, initialOptions: WatchModeOptions): Promise<FullResult['status']> {
|
export async function runWatchModeLoop(configLocation: ConfigLocation, initialOptions: WatchModeOptions): Promise<FullResult['status'] | 'restarted'> {
|
||||||
|
if (restartWithExperimentalTsEsm(undefined, true))
|
||||||
|
return 'restarted';
|
||||||
|
|
||||||
const options: WatchModeOptions = { ...initialOptions };
|
const options: WatchModeOptions = { ...initialOptions };
|
||||||
|
|
||||||
const testServerDispatcher = new TestServerDispatcher(configLocation);
|
const testServerDispatcher = new TestServerDispatcher(configLocation);
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue