2022-09-28 01:26:20 -07:00
|
|
|
import '@testing-library/jest-dom';
|
2023-04-14 04:17:20 -07:00
|
|
|
import { configure } from '@testing-library/vue';
|
2022-11-07 03:27:02 -08:00
|
|
|
import Vue from 'vue';
|
2022-12-06 03:50:06 -08:00
|
|
|
import '../plugins';
|
2022-12-13 05:00:20 -08:00
|
|
|
import { I18nPlugin } from '@/plugins/i18n';
|
2022-11-07 03:27:02 -08:00
|
|
|
|
2023-04-14 04:17:20 -07:00
|
|
|
configure({ testIdAttribute: 'data-test-id' });
|
|
|
|
|
2022-11-07 03:27:02 -08:00
|
|
|
Vue.config.productionTip = false;
|
|
|
|
Vue.config.devtools = false;
|
|
|
|
|
|
|
|
// TODO: Investigate why this is needed
|
|
|
|
// Without having this 3rd party library imported like this, any component test using 'vue-json-pretty' fail with:
|
|
|
|
// [Vue warn]: Failed to mount component: template or render function not defined.
|
|
|
|
Vue.component('vue-json-pretty', require('vue-json-pretty').default);
|
2022-12-13 05:00:20 -08:00
|
|
|
Vue.use((vue) => I18nPlugin(vue));
|
2023-02-15 05:05:55 -08:00
|
|
|
|
|
|
|
window.ResizeObserver =
|
|
|
|
window.ResizeObserver ||
|
|
|
|
vi.fn().mockImplementation(() => ({
|
|
|
|
disconnect: vi.fn(),
|
|
|
|
observe: vi.fn(),
|
|
|
|
unobserve: vi.fn(),
|
|
|
|
}));
|