tor-browser

The Tor Browser
git clone https://git.dasho.dev/tor-browser.git
Log | Files | Refs | README | LICENSE

commit 2813cea7f0678c7a8864bab67d7a5b136c86f140
parent fefcaf9b84209915a8741358c90f4fc858dfa939
Author: Alexandre Poirot <poirot.alex@gmail.com>
Date:   Tue,  7 Oct 2025 11:38:15 +0000

Bug 1989235 - [devtools] Avoid updating object test snapshots unless explicitly requested. r=devtools-reviewers,nchevobbe

This is a regression, we should only update the snapshot
if `UPDATE_SNAPSHOT` env is set to true.

Differential Revision: https://phabricator.services.mozilla.com/D266786

Diffstat:
Mdevtools/shared/tests/objects/JSObjectsTestUtils.sys.mjs | 4++++
1 file changed, 4 insertions(+), 0 deletions(-)

diff --git a/devtools/shared/tests/objects/JSObjectsTestUtils.sys.mjs b/devtools/shared/tests/objects/JSObjectsTestUtils.sys.mjs @@ -121,6 +121,10 @@ function loadExpectedValues(expectedValuesFileName) { } async function mayBeSaveExpectedValues(actualValues) { + const isUpdate = Services.env.get(UPDATE_SNAPSHOT_ENV) == "true"; + if (!isUpdate) { + return; + } if (!actualValues?.length) { return; }