fix: Add debounced Undo/Redo system to avoid character-by-character history
- Add debounced state updates for title and content (500ms delay) - Immediate UI updates with delayed history saving - Prevent one-letter-per-undo issue - Add cleanup for debounce timers on unmount
This commit is contained in:
29
mcp-server/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts
generated
vendored
Normal file
29
mcp-server/node_modules/zod/src/v3/tests/object-in-es5-env.test.ts
generated
vendored
Normal file
@@ -0,0 +1,29 @@
|
||||
// @ts-ignore TS6133
|
||||
import { expect, test } from "vitest";
|
||||
|
||||
import * as z from "zod/v3";
|
||||
|
||||
const RealSet = Set;
|
||||
const RealMap = Map;
|
||||
const RealDate = Date;
|
||||
|
||||
test("doesn’t throw when Date is undefined", () => {
|
||||
delete (globalThis as any).Date;
|
||||
const result = z.object({}).safeParse({});
|
||||
expect(result.success).toEqual(true);
|
||||
globalThis.Date = RealDate;
|
||||
});
|
||||
|
||||
test("doesn’t throw when Set is undefined", () => {
|
||||
delete (globalThis as any).Set;
|
||||
const result = z.object({}).safeParse({});
|
||||
expect(result.success).toEqual(true);
|
||||
globalThis.Set = RealSet;
|
||||
});
|
||||
|
||||
test("doesn’t throw when Map is undefined", () => {
|
||||
delete (globalThis as any).Map;
|
||||
const result = z.object({}).safeParse({});
|
||||
expect(result.success).toEqual(true);
|
||||
globalThis.Map = RealMap;
|
||||
});
|
||||
Reference in New Issue
Block a user