Skip to content

Commit

Permalink
MV #20 #2 : Incluido vote average es numero y en rango entre 0 y 10
Browse files Browse the repository at this point in the history
  • Loading branch information
LCinder committed Oct 26, 2021
1 parent 6d6b6ac commit dfcf42e
Showing 1 changed file with 10 additions and 2 deletions.
12 changes: 10 additions & 2 deletions src/tests.ts
Original file line number Diff line number Diff line change
Expand Up @@ -25,7 +25,15 @@ describe("Quiero obtener informacion de una pelicula", () => {
it("Reviews deberia ser un array y no estar vacio", () => {
assert.isArray(movie.reviews);
assert.isNotEmpty(movie.reviews);
console.log(movie.toString());

});
it("Vote average deberia ser un nº entre 0 y 10", () => {
assert.isNumber(movie.voteAverage);
assert.isAtLeast(movie.voteAverage, 0);
assert.isAtMost(movie.voteAverage, 10);
});
/* it("Spy", () => {
const spy = sinon.spy(Movie.prototype, "addReview");
const movie2 = movies.find("Tenet");
assert.equal(spy.callCount, 5);
});*/
});

0 comments on commit dfcf42e

Please sign in to comment.