/** * Copyright (c) 2020-2024, WSO2 LLC. (https://www.wso2.com). * * WSO2 LLC. licenses this file to you under the Apache License, * Version 2.0 (the "License"); you may not use this file except * in compliance with the License. * You may obtain a copy of the License at * * http://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, * software distributed under the License is distributed on an * "AS IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY * KIND, either express or implied. See the License for the * specific language governing permissions and limitations * under the License. */ module.exports = { displayName: "console", moduleDirectories: [ "node_modules", "test-configs", __dirname ], moduleFileExtensions: [ "js", "jsx", "ts", "tsx", "json", "node" ], moduleNameMapper: { "@oxygen-ui/react": "/node_modules/@oxygen-ui/react", "@thiva/core/api": "/../modules/core/dist/src/api", "@thiva/core/configs": "/../modules/core/dist/src/configs", "@thiva/core/constants": "/../modules/core/dist/src/constants", "@thiva/core/errors": "/../modules/core/dist/src/errors", "@thiva/core/exceptions": "/../modules/core/dist/src/exceptions", "@thiva/core/helpers": "/../modules/core/dist/src/helpers", "@thiva/core/hooks": "/../modules/core/dist/src/hooks", "@thiva/core/models": "/../modules/core/dist/src/models", "@thiva/core/store": "/../modules/core/dist/src/store", "@thiva/core/utils": "/../modules/core/dist/src/utils", "@thiva/core/workers": "/../modules/core/dist/src/workers", "@thiva/dynamic-forms": "/../modules/dynamic-forms/dist", "@thiva/form": "/../modules/form/dist", "@thiva/forms": "/../modules/forms/dist", "@thiva/react-components": "/../modules/react-components/dist", "\\.(css|less|scss)$": "/test-configs/__mocks__/style-file.ts", "\\.(jpg|jpeg|png|gif|eot|otf|webp|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga|md)$": "/test-configs/__mocks__/file.ts", "\\.svg": "/test-configs/__mocks__/svgr.ts", "^lodash-es/(.*)$": "/../node_modules/lodash/$1", "^react($|/.+)": "/node_modules/react$1", "uuid": "/node_modules/uuid" }, modulePaths: [ "" ], roots: [ "." ], setupFilesAfterEnv: [ "/test-configs/setup-test.ts" ], testEnvironment: "jest-environment-jsdom-global", testMatch: [ "/**/?(*.)test.{ts,tsx}" ], testPathIgnorePatterns: [ "/(build|docs|node_modules)/" ], transform: { "^.+\\.(js|jsx)?$": "babel-jest", "^.+\\.(ts|tsx)?$": [ "ts-jest", { tsconfig: "/tsconfig.json" } ] }, transformIgnorePatterns: [ "/node_modules/?(?!@thiva)", "/node_modules/(?!@oxygen-ui/react/)" ], verbose: true };