pruthvi-builds opened a new pull request, #453:
URL: https://github.com/apache/fineract-backoffice-ui/pull/453

   Closes part of #406 (part of #403) — migrates the `features/loans` half (13 
specs).
   
   ## What changed
   
   - 12 of 13 specs converted mechanically with 
`scripts/codemod-jasmine-to-vitest.mjs`.
   - `loan-view.component.spec.ts` needed one manual decision: it uses the 
object-form
     `jasmine.createSpyObj('AuthService', ['hasPermission'], { currentUser: 
signal(...) })`,
     which mixes a spied method with a plain property — not representable by 
this repo's
     method-list-only `createSpyObj` helper (`src/app/testing/mocks.ts`), by 
design per that
     file's doc comment. Rewrote it as:
     ```ts
     const authServiceSpy = {
       ...createSpyObj<AuthService>(['hasPermission']),
       currentUser: signal({ ... }),
     };
     ```
     then re-ran the codemod on that one file, which converted everything else 
(imports,
     `.and.returnValue` → `.mockReturnValue`, `spyOn` → `vi.spyOn`, 
`toBeTrue`/`toBeFalse` →
     `toBe(true/false)`) mechanically.
   - `karma-baseline.json` updated via `check-test-runner.mjs --write`.
   - `eslint-suppressions.json`: the 10 pre-existing `no-restricted-imports` 
suppressions under
     the old `.spec.ts` paths were re-keyed to the new `.test.ts` paths. Used
     `eslint --suppress-rule no-restricted-imports --suppressions-location 
eslint-suppressions.json`
     scoped to just the 13 changed files, so nothing outside this PR's scope 
got touched. Net
     diff on that file is +10/-10 — count unchanged, only paths moved, per the 
issue's note.
   
   ## Verification
   
   - `npm run test:unit` — 805 passed (150 files)
   - `npm test -- --watch=false` (Karma, headless Chrome) — 568 passed
   - Combined total unchanged: before this PR, Karma had 568+13=581 and Vitest 
had 805-59=746
     (the 13 files carry 59 `it()` cases total, confirmed by diffing `it(` 
counts per file
     against the pre-migration `.spec.ts` versions — none dropped, none 
duplicated).
     568 + 805 = 581 + 746 = 1373.
   - `npm run lint` — clean
   - `npm run format:check` — clean (ran `npm run format` once to fix 4 files)
   - `npm run check:icons` — clean
   - `npm run i18n:check` — clean
   - `npm run build` — succeeds
   - `./scripts/check-license.sh` — clean (no new files)
   
   `package-lock.json` reverted after `npm install` — the 
version-field/lockfile-metadata drift
   it produced locally was unrelated to this change and out of scope.


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