Add diagram workbench UI with Modelica DoF coaching and ISO glyphs.
Ship the Next.js cycle editor with CAD chrome, technical HX symbols, Fixed/Free boundary guidance, and secondary water/air pressure drop support in the solver stack. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
17
apps/web/vitest.setup.ts
Normal file
17
apps/web/vitest.setup.ts
Normal file
@@ -0,0 +1,17 @@
|
||||
import "@testing-library/jest-dom/vitest";
|
||||
import { afterEach } from "vitest";
|
||||
import { cleanup } from "@testing-library/react";
|
||||
|
||||
// crypto.randomUUID is used by the diagram store; jsdom may not provide it.
|
||||
const existingCrypto = (globalThis as { crypto?: Partial<Crypto> }).crypto;
|
||||
if (typeof existingCrypto?.randomUUID !== "function") {
|
||||
let counter = 0;
|
||||
const randomUUID = (): `${string}-${string}-${string}-${string}-${string}` =>
|
||||
`00000000-0000-4000-8000-${String(counter++).padStart(12, "0")}` as const;
|
||||
const cryptoStub = { ...(existingCrypto ?? {}), randomUUID } as Crypto;
|
||||
Object.defineProperty(globalThis, "crypto", { value: cryptoStub, configurable: true });
|
||||
}
|
||||
|
||||
afterEach(() => {
|
||||
cleanup();
|
||||
});
|
||||
Reference in New Issue
Block a user