redux update

This commit is contained in:
Athou
2023-12-29 11:08:33 +01:00
parent 2f1aa12e30
commit e0c05c8e5d
3 changed files with 42 additions and 68 deletions

View File

@@ -2,7 +2,7 @@
import { configureStore } from "@reduxjs/toolkit"
import { type client } from "app/client"
import { loadEntries, loadMoreEntries, markAllEntries, markEntry } from "app/entries/thunks"
import { reducers } from "app/store"
import { reducers, type RootState } from "app/store"
import { type Entries, type Entry } from "app/types"
import { type AxiosResponse } from "axios"
import { beforeEach, describe, expect, it, vi } from "vitest"
@@ -81,7 +81,7 @@ describe("entries", () => {
loading: false,
scrollingToEntry: false,
},
},
} as RootState,
})
const promise = store.dispatch(loadMoreEntries())
@@ -106,7 +106,7 @@ describe("entries", () => {
loading: false,
scrollingToEntry: false,
},
},
} as RootState,
})
store.dispatch(markEntry({ entry: { id: "3" } as Entry, read: true }))
@@ -133,7 +133,7 @@ describe("entries", () => {
loading: false,
scrollingToEntry: false,
},
},
} as RootState,
})
store.dispatch(markAllEntries({ sourceType: "category", req: { id: "all", read: true } }))