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 create an HTTP sender", () => {
UDPSender.mockClear();
Jaeger.RemoteReporter.mockClear();
const exporter = new JaegerTraceExporter({
endpoint: "http://jaeger-host:9411"
});
exporter.init(fakeTracer);
const res = exporter.getReporter();
expect(res).toBe(fakeRemoteReporter);
expect(HTTPSender).toHaveBeenCalledTimes(1);
expect(HTTPSender).toHaveBeenCalledWith({ endpoint: "http://jaeger-host:9411" });
expect(UDPSender).toHaveBeenCalledTimes(0);
expect(Jaeger.RemoteReporter).toHaveBeenCalledTimes(1);