Skip to content

web: mock `_.uniqueId()` in tests

Warren Gifford requested to merge vb/mock-lodash-unique-id into main

Created by: valerybugakov

Changes

  • Mocked _.uniqueId() in tests to avoid updating snapshots once the sequence or number of tests using this helper changes. The value returned by _.uniqueId() depends on the number of previous calls because it maintains an internal variable that increments on each call.
  • Updated snapshots with mocked values.

Encountered this issue in the PR: https://github.com/sourcegraph/sourcegraph/pull/21347.

Merge request reports

Loading