Page MenuHomePhabricator

[MEX] M5 - clean up debounce workarounds in editableTimeSnakValue.spec.js and editableSnakValue.spec.js
Open, Needs TriagePublic

Description

mw.util.debounce was initially mocked with the implementation from lodash in jest.setup.js. This paired with the speed of tests meant that debounced functions would usually only be called once in a test, even if they should have been called multiple times.

As of T409454: [MEX] M4.1.4 - First Pass - coordinates datatypes, function calls in tests are no longer debounced by default. Because editableTimeSnakValue.spec.js and editableSnakValue.spec.js were written in the time of debouncing, there are some workarounds that rely on it. Fixing these was non-trivial, so the old lodash behavior was added to this test as a temporary hack. This should be removed and the tests fixed.

Event Timeline

AudreyPenven_WMDE renamed this task from [MEX] M5 - clean up debounce workarounds in editableTimeSnakValue.spec.js to [MEX] M5 - clean up debounce workarounds in editableTimeSnakValue.spec.js and editableSnakValue.spec.js.Mar 11 2026, 1:44 PM
AudreyPenven_WMDE updated the task description. (Show Details)

Change #1268576 had a related patch set uploaded (by Sadiya.mohammed13; author: Sadiya.mohammed13):

[mediawiki/extensions/Wikibase@master] Clean up debounce workarounds in editableTimeSnakValue.spec.js and editableSnakValue.spec.js

https://gerrit.wikimedia.org/r/1268576

Ticket deprioritized for sprint 10. moved to stalled for the next two weeks