You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
While working with approval tests it is sometimes the case that one code change can result in many similar changes to a set of previously baselined approved files.
In this scenario it can be simpler to bulk approve all and use source control tools to scan the approved files for diffs rather than to review each received vs approval one by one in the configured diff reporter.
It would be helpful to add a mechanism to bulk approve all verifications, either as another verifyOptions helper
In some ruby-based approval use cases, for example, I have patched in an optional environment variable APPROVE_ALL; when set to something non-empty (e.g. 1 or 'true') all received diffs are approved.
The text was updated successfully, but these errors were encountered:
davidalpert
changed the title
Add easy approve-all method
Add an easy bulk approve-all method
Jan 28, 2024
While working with approval tests it is sometimes the case that one code change can result in many similar changes to a set of previously baselined approved files.
In this scenario it can be simpler to bulk approve all and use source control tools to scan the approved files for diffs rather than to review each received vs approval one by one in the configured diff reporter.
It would be helpful to add a mechanism to bulk approve all verifications, either as another
verifyOptions
helpergo-approval-tests/approvals.go
Lines 270 to 273 in 32d5677
Or as an environment variable.
In some ruby-based approval use cases, for example, I have patched in an optional environment variable
APPROVE_ALL
; when set to something non-empty (e.g.1
or'true'
) all received diffs are approved.The text was updated successfully, but these errors were encountered: