diff --git a/jest.config.cjs b/jest.config.cjs index e94e173a3..d8fbadd05 100644 --- a/jest.config.cjs +++ b/jest.config.cjs @@ -1,6 +1,6 @@ module.exports = { testEnvironment: 'jest-environment-jsdom', - setupFiles: ['/jest.setup.js'], + setupFilesAfterEnv: ['/jest.setup.js'], transform: { '^.+\\.vue$': '@vue/vue3-jest', '^.+\\.mjs$': 'babel-jest', diff --git a/jest.setup.js b/jest.setup.js index b95cc491c..cc70bde6a 100644 --- a/jest.setup.js +++ b/jest.setup.js @@ -1,4 +1,3 @@ -import { jest } from '@jest/globals'; import * as VueCompilerDOM from '@vue/compiler-dom'; import * as VueServerRenderer from '@vue/server-renderer'; import * as Vue from 'vue'; @@ -32,3 +31,18 @@ jest.mock('axios', () => { })), }; }); + +/* eslint-disable */ +const originalWarn = console.warn; +beforeEach(() => { + jest.spyOn(console, 'warn').mockImplementation((message) => { + if (!message.includes('resolveComponent can only be used in render() or setup()')) { + originalWarn(message); + } + }); +}); + +afterEach(() => { + console.warn.mockRestore(); +}); +/* eslint-enable */ diff --git a/src/front/src/components/carousel-list.vue b/src/front/src/components/carousel-list.vue index 21fa3d847..c425c182b 100644 --- a/src/front/src/components/carousel-list.vue +++ b/src/front/src/components/carousel-list.vue @@ -173,7 +173,6 @@ export default { }, }; -