chore: allow selecting update source type via test server (#34014)

This commit is contained in:
Pavel Feldman 2024-12-14 10:58:16 -08:00 committed by GitHub
parent 3a10c32d8a
commit 1e4239f48d
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 3 deletions

View File

@ -38,8 +38,8 @@ export type ConfigCLIOverrides = {
timeout?: number; timeout?: number;
tsconfig?: string; tsconfig?: string;
ignoreSnapshots?: boolean; ignoreSnapshots?: boolean;
updateSnapshots?: 'all'|'changed'|'missing'|'none'; updateSnapshots?: 'all' | 'changed' | 'missing' | 'none';
updateSourceMethod?: 'overwrite'|'patch'|'3way'; updateSourceMethod?: 'overwrite' | 'patch' | '3way';
workers?: number | string; workers?: number | string;
projects?: { name: string, use?: any }[], projects?: { name: string, use?: any }[],
use?: any; use?: any;

View File

@ -94,7 +94,8 @@ export interface TestServerInterface {
testIds?: string[]; testIds?: string[];
headed?: boolean; headed?: boolean;
workers?: number | string; workers?: number | string;
updateSnapshots?: 'all' | 'none' | 'missing'; updateSnapshots?: 'all' | 'changed' | 'missing' | 'none';
updateSourceMethod?: 'overwrite' | 'patch' | '3way';
reporters?: string[], reporters?: string[],
trace?: 'on' | 'off'; trace?: 'on' | 'off';
video?: 'on' | 'off'; video?: 'on' | 'off';

View File

@ -311,6 +311,7 @@ export class TestServerDispatcher implements TestServerInterface {
_optionConnectOptions: params.connectWsEndpoint ? { wsEndpoint: params.connectWsEndpoint } : undefined, _optionConnectOptions: params.connectWsEndpoint ? { wsEndpoint: params.connectWsEndpoint } : undefined,
}, },
...(params.updateSnapshots ? { updateSnapshots: params.updateSnapshots } : {}), ...(params.updateSnapshots ? { updateSnapshots: params.updateSnapshots } : {}),
...(params.updateSourceMethod ? { updateSourceMethod: params.updateSourceMethod } : {}),
...(params.workers ? { workers: params.workers } : {}), ...(params.workers ? { workers: params.workers } : {}),
}; };
if (params.trace === 'on') if (params.trace === 'on')