mirror of
https://github.com/directus/directus.git
synced 2026-04-03 03:00:39 -04:00
Enhance bug reporting from within the app (#16566)
* Fix paths of imports * Process not-found.vue as ts To prevent the following error from 'vue-tsc': error TS6504: File '/Users/pascal/Development/directus/app/src/modules/insights/routes/not-found.vue.js' is a JavaScript file. Did you mean to enable the 'allowJs' option? Note: We could also enable 'allowJS' but since this is the only js file this seems to be a more fitting fix * Drop hljs language definition for GraphQL (now in core) * Enhance bug reporting from within the app * Simplify simplify simplify --------- Co-authored-by: rijkvanzanten <rijkvanzanten@me.com>
This commit is contained in:
36
app/src/components/v-menu._test.ts
Normal file
36
app/src/components/v-menu._test.ts
Normal file
@@ -0,0 +1,36 @@
|
||||
import { test, expect, beforeEach } from 'vitest';
|
||||
import { mount } from '@vue/test-utils';
|
||||
|
||||
import VMenu from './v-menu.vue';
|
||||
import TransitionBounce from './transition/bounce.vue';
|
||||
import { GlobalMountOptions } from '@vue/test-utils/dist/types';
|
||||
import { directive } from '@/directives/click-outside';
|
||||
|
||||
beforeEach(() => {
|
||||
// create teleport target
|
||||
const el = document.createElement('div');
|
||||
el.id = 'menu-outlet';
|
||||
document.body.appendChild(el);
|
||||
});
|
||||
|
||||
const global: GlobalMountOptions = {
|
||||
directives: {
|
||||
'click-outside': directive,
|
||||
},
|
||||
components: {
|
||||
TransitionBounce,
|
||||
},
|
||||
};
|
||||
|
||||
test('Mount component', () => {
|
||||
expect(VMenu).toBeTruthy();
|
||||
|
||||
const wrapper = mount(VMenu, {
|
||||
slots: {
|
||||
default: 'Slot Content',
|
||||
},
|
||||
global,
|
||||
});
|
||||
|
||||
expect(wrapper.html()).toMatchSnapshot();
|
||||
});
|
||||
Reference in New Issue
Block a user