Created
January 6, 2023 13:38
-
-
Save sergiofilhowz/b1b8b465e94c2085188c697bcd6a9690 to your computer and use it in GitHub Desktop.
Fixtures sample
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import { faker } from '@faker-js/faker' | |
import { Quiz, QuizAnswer, QuizQuestion, QuizSubmissionInput } from '../graphql' | |
/* istanbul ignore next: no need to cover default value */ | |
export const buildQuizAnswer = (answer: Partial<QuizAnswer> = {}): QuizAnswer => ({ | |
id: faker.datatype.uuid(), | |
createdAt: faker.datatype.datetime(), | |
updatedAt: faker.datatype.datetime(), | |
content: faker.lorem.sentence(10), | |
isCorrect: faker.datatype.boolean(), | |
...answer, | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment