forked from Archives/Athou_commafeed
no longer need to insert code between imports
This commit is contained in:
@@ -1,19 +1,20 @@
|
|||||||
/* eslint-disable import/first */
|
/* eslint-disable import/first */
|
||||||
import { beforeEach, describe, expect, it, vi } from "vitest"
|
|
||||||
import { DeepMockProxy, mockDeep, mockReset } from "vitest-mock-extended"
|
|
||||||
|
|
||||||
vi.doMock("app/client", () => ({ client: mockDeep() }))
|
|
||||||
|
|
||||||
import { configureStore } from "@reduxjs/toolkit"
|
import { configureStore } from "@reduxjs/toolkit"
|
||||||
import { client } from "app/client"
|
import { client } from "app/client"
|
||||||
import { reducers } from "app/store"
|
import { reducers } from "app/store"
|
||||||
import { Entries, Entry } from "app/types"
|
import { Entries, Entry } from "app/types"
|
||||||
import { AxiosResponse } from "axios"
|
import { AxiosResponse } from "axios"
|
||||||
|
import { beforeEach, describe, expect, it, vi } from "vitest"
|
||||||
|
import { mockReset } from "vitest-mock-extended"
|
||||||
import { loadEntries, loadMoreEntries, markAllEntries, markEntry } from "./entries"
|
import { loadEntries, loadMoreEntries, markAllEntries, markEntry } from "./entries"
|
||||||
|
|
||||||
describe("entries", () => {
|
const mockClient = await vi.hoisted(async () => {
|
||||||
const mockClient = client as DeepMockProxy<typeof client>
|
const mockModule = await import("vitest-mock-extended")
|
||||||
|
return mockModule.mockDeep<typeof client>()
|
||||||
|
})
|
||||||
|
vi.mock("app/client", () => ({ client: mockClient }))
|
||||||
|
|
||||||
|
describe("entries", () => {
|
||||||
beforeEach(() => {
|
beforeEach(() => {
|
||||||
mockReset(mockClient)
|
mockReset(mockClient)
|
||||||
})
|
})
|
||||||
|
|||||||
Reference in New Issue
Block a user