Skip to content

Instantly share code, notes, and snippets.

@gaspard
Created December 2, 2018 12:50
Show Gist options
  • Save gaspard/23e90cd31c1757df12a1238cfb6e0e8a to your computer and use it in GitHub Desktop.
Save gaspard/23e90cd31c1757df12a1238cfb6e0e8a to your computer and use it in GitHub Desktop.
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