Skip to content

Commit

Permalink
Merge pull request #1 from Efcolipt/main
Browse files Browse the repository at this point in the history
tests: fix start bookItem tests
  • Loading branch information
tagir404 authored May 14, 2024
2 parents 871b0c2 + 71b95ff commit af20e3f
Showing 1 changed file with 12 additions and 9 deletions.
21 changes: 12 additions & 9 deletions src/components/__tests__/BookItem.spec.ts
Original file line number Diff line number Diff line change
@@ -1,13 +1,16 @@
import { describe, it, expect, vi } from 'vitest'
import { mount, shallowMount } from '@vue/test-utils'
import { shallowMount } from '@vue/test-utils'
import { createTestingPinia } from '@pinia/testing'

import BookItem from '@/components/BookItem.vue'
import bookCoverPhoto from '@/assets/img/book-cover.png'
import { fixReqString } from '@/modules/utils'
import { useBasketStore } from '@/store/store'
import { createPinia, setActivePinia } from 'pinia'

describe('BookItem', () => {
setActivePinia(createPinia())

const wrapper = shallowMount(BookItem, {
props: {
book: {
Expand All @@ -26,14 +29,14 @@ describe('BookItem', () => {
},
type: ''
},
global: {
plugins: [
createTestingPinia({
createSpy: vi.fn(),
stubActions: true
})
]
}
// global: {
// plugins: [
// createTestingPinia({
// createSpy: vi.fn(),
// stubActions: true
// })
// ]
// }
})

it('renders properly', () => {
Expand Down

0 comments on commit af20e3f

Please sign in to comment.