improved unit tests as suggested by @hnrch02 at https://github.com/twbs/bootstrap/pull/14154#discussion_r14975964