Moving misplaced test within contains.js