This repository has been archived on 2024-02-08. You can view files and clone it, but cannot push or open issues or pull requests.
2021-11-17 17:11:19 +00:00
|
|
|
import {ListFactory} from '../../factories/list'
|
|
|
|
import {NamespaceFactory} from '../../factories/namespace'
|
|
|
|
import {TaskFactory} from '../../factories/task'
|
|
|
|
|
2022-08-09 09:55:19 +00:00
|
|
|
export function createLists() {
|
|
|
|
NamespaceFactory.create(1)
|
|
|
|
const lists = ListFactory.create(1, {
|
|
|
|
title: 'First List'
|
|
|
|
})
|
|
|
|
TaskFactory.truncate()
|
|
|
|
return lists
|
|
|
|
}
|
|
|
|
|
2023-01-24 20:55:09 +00:00
|
|
|
export function prepareLists(setLists = (...args: any[]) => {}) {
|
2021-11-17 17:11:19 +00:00
|
|
|
beforeEach(() => {
|
2022-08-09 09:55:19 +00:00
|
|
|
const lists = createLists()
|
2021-11-17 17:11:19 +00:00
|
|
|
setLists(lists)
|
|
|
|
})
|
|
|
|
}
|