PromucFlow_constructor/app/client/packages/design-system/ads/jest.config.js

26 lines
936 B
JavaScript
Raw Normal View History

2024-07-29 13:23:26 +00:00
module.exports = {
roots: ["<rootDir>", "<rootDir>/src"], // Set this to the directory containing your source code
modulePaths: ["<rootDir>"],
moduleDirectories: ["node_modules", "src"],
setupFilesAfterEnv: ["<rootDir>/jest.setup.js"], // Optional: Additional setup
testEnvironment: "jsdom",
transform: {
chore: upgrade typescript to 5.4 (#35181) ## Description Upgrade Typescript from 4.9.5 to 5.4 Upgrading to 5.5 is not possible until we upgrade colors.js lib. It will be done in separate PR More details here https://github.com/color-js/color.js/issues/560#issuecomment-2182819685 ## Automation /ok-to-test tags="@tag.All" ### :mag: Cypress test results <!-- This is an auto-generated comment: Cypress test results --> > [!TIP] > 🟢 🟢 🟢 All cypress tests have passed! 🎉 🎉 🎉 > Workflow run: <https://github.com/appsmithorg/appsmith/actions/runs/10163124159> > Commit: 8d2e93f2e2913e715686ccb058d3efddd55aabc9 > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=10163124159&attempt=1" target="_blank">Cypress dashboard</a>. > Tags: `@tag.All` > Spec: > <hr>Tue, 30 Jul 2024 14:11:42 UTC <!-- end of auto-generated comment: Cypress test results --> ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [x] No <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit ## Summary by CodeRabbit - **New Features** - Updated TypeScript dependency to the latest version (5.4), enhancing overall functionality with potential new features and improvements. - **Improvements** - Enhanced type safety by refining the `isString` function, allowing better type inference and preventing runtime errors. - Improved comments and annotations in the `indirectEval` function for better clarity on its usage and intent. - Corrected typographical errors in error handling logic across multiple controllers, improving reliability in error messaging. - Updated export style for `IconNames` to clarify its purpose as a type, enhancing developer experience. - **Configuration Changes** - Updated Jest configurations to better support ECMAScript Modules (ESM), improving compatibility and allowing for more flexible module handling. - Adjusted TypeScript configuration to enhance module handling and compatibility. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-07-30 14:15:48 +00:00
"^.+\\.(ts|tsx)$": [
"ts-jest",
{
useESM: true,
tsconfig: {
verbatimModuleSyntax: false,
},
},
], // Use ts-jest for transforming TypeScript files
2024-07-29 13:23:26 +00:00
"\\.(svg)$": "<rootDir>/fileTransformer.js", // Create this file for SVG handling (see below)
},
moduleNameMapper: {
chore: CE code for datasource management (#38394) ## Description EE PR https://github.com/appsmithorg/appsmith-ee/pull/5821 ## Automation /ok-to-test tags="@tag.Datasource" ### :mag: Cypress test results <!-- This is an auto-generated comment: Cypress test results --> > [!CAUTION] > 🔴 🔴 🔴 Some tests have failed. > Workflow run: <https://github.com/appsmithorg/appsmith/actions/runs/12518278301> > Commit: 7656400fd906047c6d2f1b7a27a4b1b877798c4e > <a href="https://internal.appsmith.com/app/cypress-dashboard/rundetails-65890b3c81d7400d08fa9ee5?branch=master&workflowId=12518278301&attempt=2&selectiontype=test&testsstatus=failed&specsstatus=fail" target="_blank">Cypress dashboard</a>. > Tags: @tag.Datasource > Spec: > The following are new failures, please fix them before merging the PR: <ol> > <li>cypress/e2e/Sanity/Datasources/MockDBs_Spec.ts</ol> > <a href="https://internal.appsmith.com/app/cypress-dashboard/identified-flaky-tests-65890b3c81d7400d08fa9ee3?branch=master" target="_blank">List of identified flaky tests</a>. > <hr>Fri, 27 Dec 2024 17:23:33 UTC <!-- end of auto-generated comment: Cypress test results --> ## Communication Should the DevRel and Marketing teams inform users about this change? - [ ] Yes - [x] No <!-- This is an auto-generated comment: release notes by coderabbit.ai --> ## Summary by CodeRabbit - **New Features** - Introduced a new `Badge` component with documentation and stories for usage. - Added a new `RagDocuments` component for handling RAG documents in the editor. - Enhanced the `Table` component with sorting functionality. - Expanded the icon collection with new icons. - Updated documentation links for the Text component. - Added a new `DATA_TAB` entry to the debugger tab keys. - **Bug Fixes** - Adjusted column widths and content in the Table stories for better presentation. - **Chores** - Removed unused `CarbonButton` component and related files. - Updated the test suite for the `Table` component to validate sorting functionality. <!-- end of auto-generated comment: release notes by coderabbit.ai -->
2024-12-27 17:29:59 +00:00
"\\.(css|less)$": "<rootDir>/../../../test/__mocks__/styleMock.js",
2024-07-29 13:23:26 +00:00
// this mocks all binary files so jest doesn't try to convert it into js
"\\.(jpg|jpeg|png|gif|eot|otf|webp|svg|ttf|woff|woff2|mp4|webm|wav|mp3|m4a|aac|oga)$":
"<rootDir>/fileTransformer.js",
},
};