very-happy-dom (the test DOM, registered in test/preload.ts) implements classList.toggle(name, false) wrongly: it adds the class instead of removing it. Browsers remove it.
const d = document.createElement('div')
d.classList.toggle('a', false)
d.className // "a" — should be ""SearchControl now uses explicit add/remove because of this. Other code still uses toggle(name, force) and could hide bugs in tests: OfflineMapsControl, SearchControl._show, LocateControl and others.
Scope
- Fix upstream in
very-happy-domand bump the dependency. - Until then, add a test that pins the expected behaviour, so the upgrade is noticed.