File tree Expand file tree Collapse file tree 1 file changed +11
-1
lines changed
packages/browser/src/node/commands/screenshotMatcher Expand file tree Collapse file tree 1 file changed +11
-1
lines changed Original file line number Diff line number Diff line change @@ -148,7 +148,7 @@ async function determineOutcome(
148148 }
149149
150150 // no reference to compare against - create one based on update settings
151- if ( reference === null || updateSnapshot === 'all' ) {
151+ if ( reference === null ) {
152152 if ( updateSnapshot === 'all' ) {
153153 return {
154154 type : 'update-reference' ,
@@ -190,6 +190,16 @@ async function determineOutcome(
190190 return { type : 'matched-after-comparison' }
191191 }
192192
193+ if ( updateSnapshot === 'all' ) {
194+ return {
195+ type : 'update-reference' ,
196+ reference : {
197+ image : screenshot ,
198+ path : paths . reference ,
199+ } ,
200+ }
201+ }
202+
193203 return {
194204 type : 'mismatch' ,
195205 reference : {
You can’t perform that action at this time.
0 commit comments