diff --git a/__mocks__/styleMock.ts b/__mocks__/styleMock.ts new file mode 100644 index 0000000000..663f4ebaa7 --- /dev/null +++ b/__mocks__/styleMock.ts @@ -0,0 +1,2 @@ +// __mocks__/styleMock.js +module.exports = {}; diff --git a/jest.config.js b/jest.config.js index 3083bcda4f..a22062f3f1 100644 --- a/jest.config.js +++ b/jest.config.js @@ -10,7 +10,8 @@ export default { '!**/index.{js,ts}', '!**/*.d.ts', '!src/test/**', - '!vitest.config.ts',], + '!vitest.config.ts', + ], // setupFiles: ['react-app-polyfill/jsdom'], setupFiles: ['whatwg-fetch'], setupFilesAfterEnv: ['/src/setupTests.ts'], @@ -42,6 +43,8 @@ export default { '\\.svg\\?react$': '/scripts/__mocks__/fileMock.js', '\\.svg$': '/scripts/__mocks__/fileMock.js', '^@pdfme/generator$': '/scripts/__mocks__/@pdfme/generator.ts', + '\\.module\\.css$': 'identity-obj-proxy', + '\\.(css|less|scss|sass)$': '/__mocks__/styleMock.ts', }, moduleFileExtensions: [ 'web.js', diff --git a/package-lock.json b/package-lock.json index 2404c03835..f07c9e0e22 100644 --- a/package-lock.json +++ b/package-lock.json @@ -11375,6 +11375,7 @@ "resolved": "https://registry.npmjs.org/identity-obj-proxy/-/identity-obj-proxy-3.0.0.tgz", "integrity": "sha512-00n6YnVHKrinT9t0d9+5yZC6UBNJANpYEQvL2LlX6Ab9lnmxzIRcEmTPuyGScvl1+jKuCICX1Z0Ab1pPKKdikA==", "dev": true, + "license": "MIT", "dependencies": { "harmony-reflect": "^1.4.6" }, diff --git a/src/screens/PageNotFound/PageNotFound.test.tsx b/src/screens/PageNotFound/PageNotFound.spec.tsx similarity index 97% rename from src/screens/PageNotFound/PageNotFound.test.tsx rename to src/screens/PageNotFound/PageNotFound.spec.tsx index 501d9f7ef3..d8f5f1692b 100644 --- a/src/screens/PageNotFound/PageNotFound.test.tsx +++ b/src/screens/PageNotFound/PageNotFound.spec.tsx @@ -8,7 +8,7 @@ import { store } from 'state/store'; import PageNotFound from './PageNotFound'; import i18nForTest from 'utils/i18nForTest'; import useLocalStorage from 'utils/useLocalstorage'; - +import { test, expect, describe } from 'vitest'; const { setItem } = useLocalStorage(); describe('Testing Page not found component', () => {