Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.
const UDPSender = require("jaeger-client/dist/src/reporters/udp_sender").default;
const HTTPSender = require("jaeger-client/dist/src/reporters/http_sender").default;
const fakeRemoteReporter = {};
const fakeUDPSender = {};
const fakeHTTPSender = {};
const fakeRateLimitingSampler = {};
const fakeProbabilisticSampler = {};
const fakeGuaranteedThroughputSampler = {};
const fakeRemoteControlledSampler = {};
const fakeConstSampler = {};
const fakeJaegerTracer = {};
Jaeger.Tracer = jest.fn().mockImplementation(() => fakeJaegerTracer);
Jaeger.RemoteReporter = jest.fn().mockImplementation(() => fakeRemoteReporter);
UDPSender.mockImplementation(() => fakeUDPSender);
HTTPSender.mockImplementation(() => fakeHTTPSender);
Jaeger.ConstSampler = jest.fn().mockImplementation(() => fakeConstSampler);
Jaeger.RateLimitingSampler = jest.fn().mockImplementation(() => fakeRateLimitingSampler);
Jaeger.ProbabilisticSampler = jest.fn().mockImplementation(() => fakeProbabilisticSampler);
GuaranteedThroughputSampler.mockImplementation(() => fakeGuaranteedThroughputSampler);
RemoteControlledSampler.mockImplementation(() => fakeRemoteControlledSampler);
const JaegerTraceExporter = require("../../../../src/tracing/exporters/jaeger");
const ServiceBroker = require("../../../../src/service-broker");
const { MoleculerRetryableError } = require("../../../../src/errors");
const broker = new ServiceBroker({ logger: false });
describe("Test Jaeger tracing exporter class", () => {