Initial Commit
This commit is contained in:
@@ -0,0 +1,17 @@
|
||||
import { describe, expect, it } from "@suaveplan/testing/runner";
|
||||
|
||||
describe("network-testing dep-graph", () => {
|
||||
it("must not have circular dependencies", async () => {
|
||||
const mod = await import("../src/index.js");
|
||||
expect(mod).toBeDefined();
|
||||
expect(mod.createMemoryTransport).toBeDefined();
|
||||
expect(mod.createFakeWebSocketAdapter).toBeDefined();
|
||||
expect(mod.createConditionSimulator).toBeDefined();
|
||||
expect(mod.createTestPeer).toBeDefined();
|
||||
expect(mod.createNetworkEventCapture).toBeDefined();
|
||||
});
|
||||
|
||||
it("must only import from allowed workspace packages", async () => {
|
||||
expect(true).toBe(true);
|
||||
});
|
||||
});
|
||||
@@ -0,0 +1,5 @@
|
||||
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