diff --git a/webapp/pages/search/search-results.spec.js b/webapp/pages/search/search-results.spec.js index d1fbb33e2..8a7767374 100644 --- a/webapp/pages/search/search-results.spec.js +++ b/webapp/pages/search/search-results.spec.js @@ -1,7 +1,10 @@ import { config, mount } from '@vue/test-utils' import searchResults from './search-results.vue' +import VueMeta from 'vue-meta' const localVue = global.localVue +localVue.use(VueMeta, { keyName: 'head' }) + config.stubs['client-only'] = '' describe('search-results.vue', () => { @@ -10,7 +13,7 @@ describe('search-results.vue', () => { beforeEach(() => { mocks = { - $t: jest.fn(), + $t: (t) => t, } }) @@ -26,5 +29,9 @@ describe('search-results.vue', () => { it('renders', () => { expect(wrapper.findAll('.search-results')).toHaveLength(1) }) + + it('has correct content', () => { + expect(wrapper.vm.$metaInfo.title).toBe('search.title') + }) }) })