zjncs opened a new issue, #5631:
URL: https://github.com/apache/rocketmq-dashboard/issues/5631

   ## Description
   
   `DLQPage.test.tsx`'s `renders invalid message timestamps as unavailable 
without throwing` (line 158) asserts only the page-local helper directly:
   
   ```ts
   expect(formatDateTime(Number.NaN)).toBe('-');
   expect(formatDateTime(Number.POSITIVE_INFINITY)).toBe('-');
   expect(formatDateTime(0)).not.toBe('-');
   ```
   
   `DLQPage` is never rendered, yet the page routes its API values through the 
helper at three sites (`dlq.tsx:508` — the row's 最近入队时间 column, `:592`, `:885` 
— the detail's last enqueue time). A page-level regression — e.g. the column 
rendering the raw value instead of routing it through the guard — passes this 
test untouched; the test's name promises page behavior it never exercises.
   
   **Discriminating proof**: with the row column's `formatDateTime(time)` 
replaced by `String(time)` (the helper itself left intact), the current test 
still passes while the strengthened version fails — the original has zero 
covering power over the page path.
   
   ## Expected behavior
   
   Keep the helper assertions and additionally render the page with a group 
whose `lastEnqueueTime` is a non-numeric string, asserting the row renders `-` 
through the page's real rendering path.
   
   ## Environment
   
   - branch: master (0228dad5)
   - file: `web/src/pages/instance/__tests__/DLQPage.test.tsx` (test-only)


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