This file contains hidden or 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(), |
This file contains hidden or 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
| { | |
| "restartable": "rs", | |
| "ignore": [ | |
| ".git", | |
| "node_modules/**/node_modules", | |
| "src/__generated__" | |
| ], | |
| "verbose": true, | |
| "execMap": { | |
| "js": "node" |
This file contains hidden or 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
| # reads version from package.json and sets prelease equal to Circle CI build number | |
| if [ $CI ] && [ $CIRCLE_BUILD_NUM ] | |
| then | |
| newversion=$(echo $npm_package_version | sed -e "s/^\([0-9]*\.[0-9]*\.[0-9]*\-[a-z]*\).[0-9]*$/\1.$CIRCLE_BUILD_NUM/") | |
| echo "Setting version to $newversion" | |
| # uses npm-version to set version in package.json | |
| # see https://docs.npmjs.com/cli/version | |
| npm version $newversion --no-git-tag-version | |
| git add package.json | |
| git commit -m "updated version to $newversion [ci skip]" |
This file contains hidden or 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
| function (req, dstPath) { | |
| var fstream, | |
| deferred = Promise.defer(); | |
| req.pipe(req.busboy); | |
| req.busboy.on('file', (fieldname, file) => { | |
| fstream = fs.createWriteStream(dstPath); | |
| file.pipe(fstream); | |
| fstream.on('finish', () => deferred.resolve()); | |
| fstream.on('error', err => deferred.reject(err)); |
This file contains hidden or 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 java.util.Iterator; | |
| import org.hibernate.LazyInitializationException; | |
| import com.thoughtworks.xstream.converters.Converter; | |
| import com.thoughtworks.xstream.converters.MarshallingContext; | |
| import com.thoughtworks.xstream.core.TreeMarshaller.CircularReferenceException; | |
| /** | |
| * |