pawarprasad123 opened a new pull request, #632:
URL: https://github.com/apache/atlas/pull/632

   
   ## What changes were proposed in this pull request?
   
   Add Jest test infrastructure, ESLint test overrides, and shared test harness
   This PR establishes **how** the dashboard runs and lints unit tests. It does 
**not** add feature test cases
   
   What changes do
   
   - **Jest config** (`jest.config.js`): Defines where tests live (`__tests__`, 
`*.test.*`), `jsdom` environment, `ts-jest`, path aliases (`@components`, 
`@utils`, etc.), coverage settings, and optional exclusion of governance tests 
unless `RUN_DEPENDENCY_GOVERNANCE=1`.
   - **TypeScript for tests** (`tsconfig.test.json`, `tsconfig.build.json` if 
referenced): Ensures tests type-check consistently with the app’s module 
settings.
   - **Babel** (`.babelrc.json` if present): Lets Jest transform JS/ESM 
dependencies where needed.
   - **Setup files** (`src/setupTests.ts`, `src/setupTests.simple.ts`): Run 
before tests (e.g. `@testing-library/jest-dom`, `ResizeObserver` / `matchMedia` 
shims, shared `jest.mock` for heavy components like table layout).
   - **Module mocks** (`src/__mocks__/**`): Replace assets (CSS, images), 
`react-quill-new`, and co-located UI so tests stay fast and deterministic.
   - **Test utilities** (`src/utils/test-utils.tsx`): Shared `render` helpers 
(e.g. Redux/Router providers) to avoid duplicating boilerplate.
   - **ESLint** (`/.eslintrc.cjs`): Adds an **`overrides`** block **only** for 
tests, mocks, and setup so idiomatic Jest patterns (`require` in factories, 
hook usage in mocks, etc.) do not fail lint, while **production** `src` keeps 
stricter rules.
   - **Package manifest** (`package.json`, `package-lock.json`): 
Jest/RTL/ts-jest/babel and `npm` scripts (`test`, `test:coverage`, 
`test:governance`, etc.) so CI and developers run the same commands.
   - **Governance doc** (`docs/DEPENDENCY_AND_DEPENDABOT_TEST_PLAN.md`): 
Documents optional dependency/governance workflow (paired with governance 
**tests** in PR 6).
   
   - Without them, tests either **do not run**, **fail to resolve imports**, or 
**lint incorrectly**; later PRs depend on this foundation **first**.
   
   
   
   ## How was this patch tested?
   Manual test, test pass
   <img width="1105" height="601" alt="Screenshot from 2026-05-14 16-26-37" 
src="https://github.com/user-attachments/assets/21ceb331-8aa1-4bcc-bda0-ea5c4aa86db3";
 />
   


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to