Initial Commit

This commit is contained in:
2026-05-27 23:47:53 +01:00
parent fbc70f96e6
commit 9b28db724f
18103 changed files with 1600554 additions and 0 deletions

View File

@@ -0,0 +1,18 @@
import { describe, expect, it } from "@suaveplan/testing/runner";
describe("dep-graph", () => {
it("package has correct name", { timeout: 5000 }, async () => {
const pkg = await import("../package.json", { with: { type: "json" } });
expect(pkg.default.name).toBe("@suaveplan/events-otel");
});
it("exports attachEventTracing", { timeout: 30000 }, async () => {
const { attachEventTracing } = await import("../src/index.js");
expect(typeof attachEventTracing).toBe("function");
});
it("exports serializeTraceContext", { timeout: 30000 }, async () => {
const { serializeTraceContext } = await import("../src/index.js");
expect(typeof serializeTraceContext).toBe("function");
});
});

View File

@@ -0,0 +1,10 @@
import { webcrypto } from "node:crypto";
// Polyfill Web Crypto for Node.js environments (Vitest forks pool)
if (typeof globalThis.crypto === "undefined") {
Object.defineProperty(globalThis, "crypto", {
value: webcrypto,
writable: false,
configurable: true,
});
}