refactors the card.js tests

and another one!