Initial Commit
This commit is contained in:
@@ -0,0 +1,21 @@
|
||||
import { describe, expect, it } from "@suaveplan/testing/runner";
|
||||
|
||||
describe("network-plugin-transport-manager dep-graph", () => {
|
||||
it("loads index.js and exports every public class", async () => {
|
||||
const mod = await import("../src/index.js");
|
||||
expect(mod.TransportPool).toBeDefined();
|
||||
expect(mod.CapabilityNegotiator).toBeDefined();
|
||||
expect(mod.PriorityRouter).toBeDefined();
|
||||
expect(mod.TransportSelector).toBeDefined();
|
||||
expect(mod.RoundRobinBalancer).toBeDefined();
|
||||
expect(mod.TransportHealthMonitor).toBeDefined();
|
||||
expect(mod.QualityTrendAnalyzer).toBeDefined();
|
||||
expect(mod.PreemptiveSelector).toBeDefined();
|
||||
expect(mod.SessionPersistenceBuffer).toBeDefined();
|
||||
expect(mod.ConnectionRecoveryManager).toBeDefined();
|
||||
expect(mod.SessionContinuityGuard).toBeDefined();
|
||||
expect(mod.BatteryAwareScheduler).toBeDefined();
|
||||
expect(mod.BandwidthConservator).toBeDefined();
|
||||
expect(mod.TransportManagerPlugin).toBeDefined();
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,8 @@
|
||||
// Ensure `globalThis.crypto` is available in bare-Node vitest runs.
|
||||
import { webcrypto } from "node:crypto";
|
||||
|
||||
type WritableGlobal = { crypto?: Crypto };
|
||||
const g = globalThis as WritableGlobal;
|
||||
if (g.crypto === undefined) {
|
||||
g.crypto = webcrypto as unknown as Crypto;
|
||||
}
|
||||
Reference in New Issue
Block a user