docs: clarify updateSourceMethod (#34314)

This commit is contained in:
Pavel Feldman 2025-01-13 18:25:32 -08:00 committed by GitHub
parent 9a9d22af44
commit fe96104ce2
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 9 additions and 8 deletions

View File

@ -594,10 +594,10 @@ export default defineConfig({
* since: v1.50
- type: ?<[UpdateSourceMethod]<"overwrite"|"3way"|"patch">>
Defines how to update the source code snapshots.
* `'overwrite'` - Overwrite the source code snapshot with the actual result.
* `'3way'` - Use a three-way merge to update the source code snapshot.
* `'patch'` - Use a patch to update the source code snapshot. This is the default.
Defines how to update snapshots in the source code.
* `'patch'` - Create a unified diff file that can be used to update the source code later. This is the default.
* `'3way'` - Generate merge conflict markers in source code. This allows user to manually pick relevant changes, as if they are resolving a merge conflict in the IDE.
* `'overwrite'` - Overwrite the source code with the new snapshot values.
## property: TestConfig.use
* since: v1.10

View File

@ -1689,10 +1689,11 @@ interface TestConfig<TestArgs = {}, WorkerArgs = {}> {
updateSnapshots?: "all"|"changed"|"missing"|"none";
/**
* Defines how to update the source code snapshots.
* - `'overwrite'` - Overwrite the source code snapshot with the actual result.
* - `'3way'` - Use a three-way merge to update the source code snapshot.
* - `'patch'` - Use a patch to update the source code snapshot. This is the default.
* Defines how to update snapshots in the source code.
* - `'patch'` - Create a unified diff file that can be used to update the source code later. This is the default.
* - `'3way'` - Generate merge conflict markers in source code. This allows user to manually pick relevant changes,
* as if they are resolving a merge conflict in the IDE.
* - `'overwrite'` - Overwrite the source code with the new snapshot values.
*/
updateSourceMethod?: "overwrite"|"3way"|"patch";