Adding unit tests for Javascript models