Repository navigation
Commit f4c69c6
test(server-utils): Make the trace continuation assertions provable
Both cases passed vacuously. `not.toBe(TRACE_ID)` on the malformed carrier also
held when no agent span was opened at all, since `undefined` is not the carrier's
id either; suppressing span creation entirely failed nine other tests and left
that one green. And the active-trace case never checked the span landed on the
surrounding request's trace, so continuing an unrelated new trace passed too.
Now the first asserts a well-formed trace id, and the second asserts the agent
span carries the `incoming request` span's own trace id. Dropping the
`!getActiveSpan()` guard fails the second.
Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>1 parent a66a8ea commit f4c69c6
1 file changed
Lines changed: 8 additions & 2 deletions
| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
202 | 202 | | |
203 | 203 | | |
204 | 204 | | |
| 205 | + | |
| 206 | + | |
| 207 | + | |
205 | 208 | | |
206 | 209 | | |
207 | 210 | | |
208 | 211 | | |
209 | 212 | | |
210 | 213 | | |
211 | | - | |
| 214 | + | |
| 215 | + | |
| 216 | + | |
| 217 | + | |
212 | 218 | | |
213 | 219 | | |
214 | 220 | | |
215 | | - | |
| 221 | + | |
216 | 222 | | |
217 | 223 | | |
218 | 224 | | |
| |||
0 commit comments