Skip to content

Commit bd05282

Browse files
author
Stephen Belanger
committed
test(context): add 00 flag test
1 parent 6341cd9 commit bd05282

File tree

1 file changed

+13
-0
lines changed

1 file changed

+13
-0
lines changed

test/instrumentation/trace-context.js

Lines changed: 13 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -143,4 +143,17 @@ test('child', t => {
143143

144144
t.end()
145145
})
146+
147+
t.test('neither', t => {
148+
const header = `${version}-${traceId}-${id}-00`
149+
const context = TraceContext.fromString(header).child()
150+
151+
isValid(t, context)
152+
t.equal(context.version, version, 'version matches')
153+
t.equal(context.traceId, traceId, 'traceId matches')
154+
t.notEqual(context.id, id, 'has new id')
155+
t.equal(context.flags, '00', 'neither remains neither')
156+
157+
t.end()
158+
})
146159
})

0 commit comments

Comments
 (0)