Page MenuHomePhabricator

Unit tests: consider using URLSearchParams for URL-checking
Open, LowPublic

Description

Description

In test/features/v1/mockedServicesOrchestrateTest/wikidataTests.js, we currently check that constructed URLs are correct using string equality (after getting them from captured logs). We can make this more robust as follows:

  • Parse the params with URLSearchParams and check for the specific keys we want.

Otherwise, if the code trivially changes to add keys in a different order, we might end up in a situation where the tests will fail for no reason.


Completion checklist