Skip to content

Commit

Permalink
cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
gromdimon committed Nov 6, 2023
1 parent a6b9408 commit 22e326e
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions frontend/src/views/__tests__/HomeView.spec.ts
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,6 @@ import { afterEach, describe, expect, it, vi } from 'vitest'
import { nextTick } from 'vue'
import { VMenu } from 'vuetify/components'

import { DottyClient } from '@/api/dotty'
import FooterDefault from '@/components/FooterDefault.vue'
import HeaderDefault from '@/components/HeaderDefault.vue'
import SearchBar from '@/components/SearchBar.vue'
Expand Down Expand Up @@ -103,7 +102,9 @@ describe.concurrent('HomeView with mocked router', async () => {
})

it('searches for example by click', async () => {
vi.spyOn(DottyClient.prototype, 'toSpdi').mockResolvedValue(null)
global.fetch = vi.fn((): any =>
Promise.resolve({ ok: true, json: () => Promise.resolve({ success: false, value: null }) })
)

const { wrapper } = await setupMountedComponents(
{ component: HomeView, template: true },
Expand Down

0 comments on commit 22e326e

Please sign in to comment.