Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
it("should convert normal span to Datadog span with parentID, env & logs", () => {
exporter.ddTracer.startSpan.mockClear();
fakeDdSpan.context.mockClear();
fakeDdSpan.setTag.mockClear();
DatadogSpanContext.mockClear();
exporter.convertID = jest.fn(id => id);
exporter.opts.env = "testing";
const fakeOldSpan = { name: "old-span" };
fakeTracerScope._spans[asyncHooks.executionAsyncId()] = fakeOldSpan;
const span = {
name: "Test Span",
type: "action",
id: "aaa-12345678901234567890",
traceID: "bbb-12345678901234567890",
parentID: "ccc-12345678901234567890",
service: {
fullName: "v1.posts"
},