commit 4c6c028a3547728b42db74830fcdae5befa7b17d
parent 914af540c0361f1aa21d668cb8a56ed80112850e
Author: Alexandre Poirot <poirot.alex@gmail.com>
Date: Mon, 6 Oct 2025 11:50:29 +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:
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;
}