In T280650, a bug arose as a result of a typo, which could have been caught by some simple unit testing. However, the suggestion.js module in WikibaseQualityConstraints is not currently tested, nor is it easy to test, as it relies on some DOM querying and global state. With some modification to the files, however, we would be able to test (at the very least) the hook handler callback attached to wikibase.entityselector.search (See suggestions.js:118-163).
An exploration of this has begun in patch 692359
Requirements:
- WikibaseQualityConstraints extension installed
ACs:
- There are at least two unit tests covering all execution paths of the wikibase.entityselector.search hook handler.