tor-browser

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

commit 0ba8232979a73c53fe50f069fafee02843f2c79e
parent 884ba6e5ec39012cc63e571e8d967b5d97a80c5d
Author: Alexandre Poirot <poirot.alex@gmail.com>
Date:   Tue,  7 Oct 2025 20:50:04 +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; }