Skip to content

Commit

Permalink
switch back to english faker
Browse files Browse the repository at this point in the history
  • Loading branch information
Octowl committed Nov 5, 2024
1 parent 26549fa commit 5a82d27
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions challenge.test.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
const { fakerAR } = require("@faker-js/faker");
const { faker } = require("@faker-js/faker");
const { addReview } = require("./objects");

describe("🌶️🌶️🌶️ Challenge", () => {
Expand All @@ -7,23 +7,23 @@ describe("🌶️🌶️🌶️ Challenge", () => {

beforeEach(() => {
book = {
title: fakerAR.book.title(),
author: fakerAR.book.author(),
publishedYear: fakerAR.date.past().getFullYear(),
genre: fakerAR.book.genre(),
title: faker.book.title(),
author: faker.book.author(),
publishedYear: faker.date.past().getFullYear(),
genre: faker.book.genre(),
};
newReview = {
reviewer: fakerAR.person.fullName(),
comment: fakerAR.lorem.sentence(),
reviewer: faker.person.fullName(),
comment: faker.lorem.sentence(),
};
});

describe("addReview", () => {
it("should add a review to an exist array of reviews", () => {
book.reviews = [
{
reviewer: fakerAR.person.fullName(),
comment: fakerAR.lorem.sentence(),
reviewer: faker.person.fullName(),
comment: faker.lorem.sentence(),
},
];
const { reviewer, comment } = newReview;
Expand Down

0 comments on commit 5a82d27

Please sign in to comment.