Aman-Mittal opened a new issue, #404:
URL: https://github.com/apache/fineract-backoffice-ui/issues/404

   Part of #403. **Good first issue** — the largest batch that is 100% 
mechanical, with no file needing a judgement call.
   
   ## What to do
   
   All 32 specs under `src/app/features/system/` still run on the deprecated 
Karma runner. Move them:
   
   ```bash
   node scripts/codemod-jasmine-to-vitest.mjs $(node -p 
"require('./karma-baseline.json').specs.filter(f=>f.startsWith('src/app/features/system/')).join('
 ')")
   npm run test:unit
   node scripts/check-test-runner.mjs --write
   npm run lint:prune && npm run format
   npm test -- --watch=false
   ```
   
   The codemod renames `*.spec.ts` to `*.test.ts` and rewrites the dialect. 
Every one of these 32 converts cleanly — the script reports `0 left for a 
human` for this area.
   
   ## Why the rename matters
   
   The two runners select by filename: `*.spec.ts` is Karma, `*.test.ts` is 
Vitest. That is what lets the suite move in batches instead of one 192-file 
commit, and what `scripts/check-test-runner.mjs` enforces in CI.
   
   ## Acceptance criteria
   
   - [ ] No `.spec.ts` files remain under `src/app/features/system/`
   - [ ] `npm run test:unit` passes
   - [ ] `npm test -- --watch=false` passes
   - [ ] Karma total + Vitest total is unchanged from before the batch — quote 
both numbers in the PR description
   - [ ] `npm run check:test-runner` passes and `karma-baseline.json` is 
updated in the same commit
   - [ ] `npm run lint` and `npm run format:check` clean
   
   ## Things that trip people up
   
   - **`eslint-suppressions.json` is keyed by file path.** Renaming a file 
orphans its recorded violations, so run `npm run lint:prune` and commit the 
result. The total suppression count should not change — only the paths.
   - **Do not change assertions.** If a spec looks wrong, migrate it as-is and 
open a separate issue. A diff that both renames and rewrites cannot be reviewed 
as either.
   
   Background: 
[`DOCS/adr/0004-vitest-migration.md`](DOCS/adr/0004-vitest-migration.md). Ask 
in the issue if anything is unclear — the point of these batches is that they 
are approachable.
   


-- 
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