diff --git a/objects.js b/objects.js index a231247..db5d385 100644 --- a/objects.js +++ b/objects.js @@ -76,18 +76,6 @@ function addSecondAuthor(book, additionalAuthor) { // write your code here... } -/** - * addReviews - * - * - receives a book object - * - receives an array of review objects - * - * - returns the book object with a `reviews` property that contains the reviews array - */ -function addReviews(book, reviews) { - // write your code here... -} - /** * 🌶️🌶️🌶️ addReview * @@ -111,6 +99,5 @@ module.exports = { addISBN, updatePublishedYear, addSecondAuthor, - addReviews, addReview, }; diff --git a/objects.test.js b/objects.test.js index dd993d2..b3c8ff6 100644 --- a/objects.test.js +++ b/objects.test.js @@ -6,7 +6,6 @@ const { addISBN, updatePublishedYear, addSecondAuthor, - addReviews, } = require("./objects.js"); describe("Book Object Manipulations", () => { @@ -73,9 +72,7 @@ describe("Book Object Manipulations", () => { expect(updatedBook.publishedYear).toBe(publishYear); }); }); - }); - describe("Advanced Object Operations", () => { describe("addSecondAuthor", () => { it("should modify the author property to include an additional author", () => { const secondAuthor = faker.person.fullName(); @@ -83,18 +80,5 @@ describe("Book Object Manipulations", () => { expect(updatedBook.author).toEqual([book.author, secondAuthor]); }); }); - - describe("Add Reviews", () => { - it("should add reviews to the book", () => { - const reviews = Array(10) - .fill(0) - .map(() => ({ - reviewer: faker.person.fullName(), - comment: faker.lorem.sentence(), - })); - const updatedBook = addReviews(book, reviews); - expect(updatedBook.reviews).toEqual(reviews); - }); - }); }); });