chore(changelog): add test for addition of trailing newline

Adds tests for the functionality added by #9550.

Closes #10358