rearranging to mallow using jQuery inside tests