Trying to test UseHead in my component that’s inside of a computed but it is throwing the following error Cannot read properties of undefined (reading 'name')
Vue Component has
useHead(computed(() => ({
title: data?.title,
})));
Jest Test
import { useHead } from '@unhead/vue';
jest.mock('@unhead/vue');
const expectedArguments = { title: 'Test Title' };
describe('Page Meta Tests', () => {
it('should display meta title', async () => {
expect(useHead).toHaveBeenCalledWith(expectedArguments);
});
});