1
0

fix: clear all localstorage when logging out

This commit is contained in:
kolaente
2022-08-09 11:55:19 +02:00
parent 3440d71e74
commit 51ffe93048
3 changed files with 45 additions and 11 deletions

View File

@ -3,14 +3,19 @@ import {UserFactory} from '../../factories/user'
import {NamespaceFactory} from '../../factories/namespace'
import {TaskFactory} from '../../factories/task'
export function createLists() {
UserFactory.create(1)
NamespaceFactory.create(1)
const lists = ListFactory.create(1, {
title: 'First List'
})
TaskFactory.truncate()
return lists
}
export function prepareLists(setLists = () => {}) {
beforeEach(() => {
UserFactory.create(1)
NamespaceFactory.create(1)
const lists = ListFactory.create(1, {
title: 'First List'
})
const lists = createLists()
setLists(lists)
TaskFactory.truncate()
})
}