Created
December 2, 2018 12:50
-
-
Save gaspard/23e90cd31c1757df12a1238cfb6e0e8a to your computer and use it in GitHub Desktop.
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 { describe, it } from 'test' | |
import { createCollection, privateCollectionId, userFromWordList } from './' | |
export async function makeUser(wordList: string[]) { | |
const user = await userFromWordList(wordList) | |
const privateCollection = await createCollection(user, { | |
id: privateCollectionId(user.id), | |
}) | |
return { user, privateCollection } | |
} | |
describe('makeUser', () => { | |
it('should create user and collections', async () => { | |
const wordList = [ | |
'boyfriend', | |
'fruit', | |
'banjo', | |
'enjoy', | |
'palace', | |
'software', | |
] | |
const { user, privateCollection } = await makeUser(wordList) | |
console.log(user, privateCollection) | |
}) | |
}) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment