Skip to content

Commit 297bdfa

Browse files
committed
Improve span tests
1 parent 9642741 commit 297bdfa

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

packages/dd-trace/test/opentracing/span.spec.js

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -186,7 +186,8 @@ describe('Span', () => {
186186
expect(span.context()._tags).to.have.property('_dd.entry_location.method')
187187
expect(span.context()._tags['_dd.entry_location.file']).to.equal(__filename)
188188
expect(span.context()._tags['_dd.entry_location.line']).to.be.a('string')
189-
expect(parseInt(span.context()._tags['_dd.entry_location.line'], 10)).to.be.gt(0)
189+
expect(span.context()._tags['_dd.entry_location.line']).to.match(/^\d+$/)
190+
expect(Number(span.context()._tags['_dd.entry_location.line'])).to.be.gt(0)
190191
expect(span.context()._tags['_dd.entry_location.method']).to.equal('helloWorld')
191192
})
192193

0 commit comments

Comments
 (0)