Remove `stripTrailingCharacters` from tests Upstream-commit: b9d2ede4d4dc67b97abd0254a9e431aa9c89b932 Component: engine