Use text_helper.removeWhitespace in specs/frontend and ee/spec/frontend
-
Please check this box if this contribution uses AI-generated content (including content generated by GitLab Duo features) as outlined in the GitLab DCO & CLA. As a benefit of being a GitLab Community Contributor, you receive complimentary access to GitLab Duo.
What does this MR do and why?
Use text_helper.removeWhitespace in specs/frontend and ee/spec/frontend
- Replaces ad-hoc whitespace normalization in frontend specs (e.g., .replace(/\s\s+/g, ' ')) with the shared helper function removeWhitespace from helpers/text_helper.
- This centralizes the logic, improves readability, and makes future changes to whitespace normalization easier and less error-prone.
- Follows up on the long-standing feedback to avoid duplicating this regex in specs and prefer a common helper.
Signed-off-by: Yash Suthar yashsuthar983@gmail.com
Issue: #25333
Edited by 🤖 GitLab Bot 🤖