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;
tsconfig?: string;
ignoreSnapshots?: boolean;
updateSnapshots?: 'all'|'changed'|'missing'|'none';
updateSourceMethod?: 'overwrite'|'patch'|'3way';
updateSnapshots?: 'all' | 'changed' | 'missing' | 'none';
updateSourceMethod?: 'overwrite' | 'patch' | '3way';
workers?: number | string;
projects?: { name: string, use?: any }[],
use?: any;

View File

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

View File

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