Skip to content

Commit

Permalink
Add missing test in previous commit
Browse files Browse the repository at this point in the history
  • Loading branch information
uurien committed May 13, 2024
1 parent bbb3b8d commit d702a24
Showing 1 changed file with 14 additions and 1 deletion.
15 changes: 14 additions & 1 deletion packages/dd-trace/test/encode/0.4.spec.js
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
'use strict'

require('../setup/tap')
// require('../setup/tap')

const { expect } = require('chai')
const msgpack = require('msgpack-lite')
Expand Down Expand Up @@ -440,5 +440,18 @@ describe('encode', () => {
}
expect(trace[0].meta_struct).to.deep.equal(expectedMetaStruct)
})

it('should not encode null meta_struct', () => {
data[0].meta_struct = null

encoder.encode(data)

const buffer = encoder.makePayload()

const decoded = msgpack.decode(buffer, { codec })
const trace = decoded[0]

expect(trace[0].meta_struct).to.be.undefined
})
})
})

0 comments on commit d702a24

Please sign in to comment.