Aman-Mittal commented on issue #410:
URL:
https://github.com/apache/fineract-backoffice-ui/issues/410#issuecomment-5386706409
Verified this on current `main` — you're right, and for exactly the reason
you give.
- Lines 67–68 are `/\btick\(/` and `/\bflush\(/`, and `\b` does match after
a dot, so `req.flush()`
and `jasmine.clock().tick()` both trip them.
- Nothing in the repo imports `flush` from `@angular/core/testing`. Five
specs import
`fakeAsync, tick`; none import `flush`. Every `flush(` call site is
`.flush(` on an
`HttpTestingController` request — so the files this issue attributes to
zone work are HTTP mocks.
- `(?<!\.)` on both takes the list from 30 to 22 and frees exactly the eight
you name.
- The body's "19" is stale; it is 30. I have corrected it.
Two refinements, both in your favour.
**`.calls.mostRecent()` is not an unhandled construct.** Line 136 already
rewrites
`.calls.mostRecent().args` to `.mock.lastCall!`, which is why `group-view`
converts cleanly despite
using it. `deposit-account-view` fails for a narrower reason — prettier
wrapped that one:
```ts
...TransactionsTransactionId.calls.mostRecent()
.args;
```
so the single-line regex misses it. `/\.calls\.mostRecent\(\)\s*\.args/g`
picks it up. That does not
change the skip count — `mostRecent` is a rewrite rule, not a skip trigger —
but it does change what
compiles.
**With both fixes it is 5 of 8, not 4.** I converted all eight and
type-checked: `auth.service`,
`config.service`, `center-view`, `group-view` and `deposit-account-view` all
compile, and the suite
is green at 622 across 84 files. Only three still fail — `error.interceptor`
(32 errors),
`loading.interceptor` (3) and `report-execution.service` (1) — on `fail` and
`expect().nothing()`,
which have no rules.
I did briefly doubt your `report-execution.service` call, because grepping
`\bfail\(` found nothing.
It is `error: fail,` — a bare reference, not a call. You were right and my
grep was wrong.
On CodeQL, since it tends to come up on regex changes: the lookbehind is
fine. `(?<!\.)` is
fixed-width against a literal, so there is no backtracking for the ReDoS
queries to find — I
benchmarked both patterns and the `\s*` variant against 50k-character inputs
and they stay linear.
Yes please to the PR. One ask: **split it** — both regex fixes as one
commit, then one commit per
converted spec. The issue asks for that, and it is what makes "did the
timing model change?"
reviewable. `config.service.spec.ts` is safe to include; #437 rewrote it but
merged this morning, so
there is nothing left to collide with.
Genuinely manual set after this: the 5 `fakeAsync` files, the 2 `done()`
interceptors, and
`fail` / `expect().nothing()` wherever they appear.
--
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]