Skip to content

Commit

Permalink
Fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
Jan committed Sep 5, 2022
1 parent 8940bcb commit b8bcac3
Showing 1 changed file with 3 additions and 5 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -11,15 +11,12 @@ localVue.use(DesignSystem)
localVue.use(VueCompositionAPI)
localVue.use(Vuex)

const user = { id: 'test' }

describe('Preview component', () => {
it('should set correct props on oc-resource component', () => {
const wrapper = getWrapper()
const ocResource = wrapper.find('oc-resource-stub')

expect(ocResource.exists()).toBeTruthy()
console.log(wrapper.vm)
expect(ocResource.props().resource).toMatchObject(wrapper.vm.searchResult.data)
})
describe('computed folderLink and parentFolderLink', () => {
Expand Down Expand Up @@ -112,7 +109,8 @@ function getWrapper({
name: 'lorem.txt',
path: '/'
}
}
},
user = { id: 'test' }
} = {}) {
return shallowMount(Preview, {
localVue,
Expand Down Expand Up @@ -141,7 +139,7 @@ function getWrapper({
}),
mocks: {
$route: route,
$gettext: jest.fn()
$gettext: (text) => text
},
propsData: {
searchResult
Expand Down

0 comments on commit b8bcac3

Please sign in to comment.