WordPress database error: [Can't create/write to file '/tmp/#sql-temptable-4db-1527ea-bae.MAI' (Errcode: 28 "No space left on device")]SELECT p.* FROM wp_mdb_forum_posts AS p LEFT JOIN wp_mdb_forum_posts AS q ON( q.Id = p.ParentId AND p.Id = q.AcceptedAnswerId ) WHERE p.PostTypeId = 2 AND p.ParentId = 122313 GROUP BY p.Id ORDER BY CASE WHEN q.Id IS NOT NULL THEN 1 ELSE 0 END DESC, p.UpvoteCount DESC, p.CreationDate ASC
Topic: Vitest: Cannot read properties of undefined (reading 'defineComponent')
ntallas.ioannis@nokia.com
asked 3 years ago
Hello,
I'm trying to implement a unit test using Vitest on a component that imports MDBAlert.
import { expect, test } from 'vitest';
import { mount, VueWrapper } from '@vue/test-utils';
import BaseWarning from '@/components/base/BaseWarning.vue';
test('mount BaseWarning', async () => {
expect(BaseWarning).toBeTruthy();
const wrapper: VueWrapper<any> = mount(BaseWarning, {
props: {
warningText: 'test'
}
});
expect(wrapper.text()).toContain('test');
});
And I get the following error message when executing the unit tests.
FAIL components/__tests__/BaseWarning.test.ts [ components/__tests__/BaseWarning.test.ts ]
TypeError: Cannot read properties of undefined (reading 'defineComponent')
❯ ../../../../../../../../../../../../C:/src/SPA/webct/Vite_Typescript/webct-app/node_modules/mdb-vue-ui-kit/js/mdb.umd.min.js:1:299
❯ ../../../../../../../../../../../../C:/src/SPA/webct/Vite_Typescript/webct-app/node_modules/mdb-vue-ui-kit/js/mdb.umd.min.js:1:214
❯ ../../../../../../../../../../../../C:/src/SPA/webct/Vite_Typescript/webct-app/node_modules/mdb-vue-ui-kit/js/mdb.umd.min.js:1:234
I have tried to modify tsconfig.vitest.json to include mdb as a dependency without success. I have searched for the issue without getting anything similar. Has anyone encountered this problem?
Thank you.
FREE CONSULTATION
Hire our experts to build a dedicated project. We'll analyze your business requirements, for free.
Open
- User: Free
- Premium support: No
- Technology: MDB Vue
- MDB Version: MDB5 3.1.1
- Device: PC
- Browser: Chrome
- OS: Windows 10
- Provided sample code: No
- Provided link: No