app/frontend/support/generate_comments_data.ts in decidim-comments-0.0.8.1 vs app/frontend/support/generate_comments_data.ts in decidim-comments-0.1.0

- old
+ new

@@ -1,15 +1,15 @@ import { date, image, lorem, name, random } from "faker/locale/en"; -import { CommentFragment } from "../support/schema"; +import { CommentFragment } from "../support/schema"; /** * Generate random comment data to emulate a database real content * @param {number} num - The number of comments to generate random data * @returns {Object[]} - An array of objects representing comments data */ const generateCommentsData = (num = 1) => { - let commentsData: CommentFragment[] = []; + const commentsData: CommentFragment[] = []; for (let idx = 0; idx < num; idx += 1) { commentsData.push({ id: random.uuid(), type: "Decidim::Comments::Comment",