unbridled-41 commented on PR #4746:
URL: 
https://github.com/apache/rocketmq-dashboard/pull/4746#issuecomment-5759872771

   ### Evidence added in the second commit (`dae7e5df`)
   
   The first commit's test covered the status mapping; the PR also claims the 
`null` (no trace found) contract is preserved and that a trace without a 
`nodes` array still renders. Both branches are now pinned by "keeps the key 
lookup null and node-default contracts" (`web/src/api/message.test.ts`).
   
   **Teeth, measured against the base source** (only `web/src/api/message.ts` 
reverted to `cd448e17`, test file untouched):
   
   ```
   $ cd web && npx vitest run src/api/message.test.ts --maxWorkers=2
   × maps backend trace node statuses on the key lookup too
     AssertionError: expected [ Array(3) ] to deeply equal [ 'error', 'finish', 
'wait' ]
   × keeps the key lookup null and node-default contracts
     AssertionError: expected { consumerStatus: [] } to deeply equal { 
consumerStatus: [], nodes: [] }
      Tests  2 failed | 7 passed (9)
   ```
   
   Honest split: inside the second case the `null` assertion passes on the base 
as well (the old code returned the payload verbatim, so a `null` payload stayed 
`null`) — that assertion locks the boundary; the `nodes` assertion is the 
regression guard for the normalisation branch. The source file was restored 
immediately afterwards (`git diff --stat` = the test file only).
   
   **After the second commit:**
   
   ```
   $ npx vitest run src/api/message.test.ts --maxWorkers=2                      
 # 9 passed (1 file)
   $ npx vitest run src/pages/instance/__tests__/MessagePage.test.tsx \\
         src/pages/instance/__tests__/MessagePageAsyncState.test.tsx \\
         src/api/message.test.ts src/utils/messageTraceDiagnostics.test.ts 
--maxWorkers=2
         Test Files  4 passed (4)      Tests  46 passed (46)
   $ npx tsc -b                                                                 
 # exit 0
   $ npx eslint src/api/message.ts src/api/message.test.ts                      
  # exit 0
   $ npx vite build                                                             
 # ✓ built in 9.64s
   ```
   
   **State of this PR**
   
   - head `dae7e5dff5dd6a3014bd091baf1b2cc0c7af9b8c`, 2 commits (`0e5d55c5` fix 
+ `dae7e5df` test), base `rocketmq-studio`, MERGEABLE/CLEAN, not merged.
   - numstat: `web/src/api/message.ts +12/-2`, `web/src/api/message.test.ts 
+53/-0`.
   - No behaviour claim in the description is left without a test: the mapping, 
the node default and the `null` contract are all covered; the message-id path 
is covered by the two pre-existing cases in the same file.
   


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