Problem/Motivation
This seems like a very useful method. Introduced in #2700495: Method removing expired drupalSettings.ajax tries to remove settings when there is no ajax defined.
Proposed resolution
Move it to JavaScript test base.
Remaining tasks
Patch.
User interface changes
None.
API changes
Additional method on JTB.
Data model changes
None.