import { describe, it, expect } from "vitest";
import { initOtelServerNode } from "./init-server-node";

describe("initOtelServerNode", () => {
  it("returns an SDK handle with shutdown()", () => {
    const sdk = initOtelServerNode({
      dsn: "",
      serviceName: "test-service",
      environment: "test",
    });
    expect(sdk).toBeDefined();
    expect(typeof sdk.shutdown).toBe("function");
  });

  it("accepts a DSN and wires the Sentry bridge", () => {
    const sdk = initOtelServerNode({
      dsn: "https://test@sentry.io/1",
      serviceName: "test-service",
      environment: "test",
    });
    expect(sdk).toBeDefined();
  });
});
