MCPcopy Create free account
hub / github.com/TypeCellOS/BlockNote / compareDocToSnapshot

Function compareDocToSnapshot

tests/src/utils/editor.ts:44–48  ·  view source on GitHub ↗
(page: Page, name: string)

Source from the content-addressed store, hash-verified

42}
43
44export async function compareDocToSnapshot(page: Page, name: string) {
45 // Remove id from docs
46 const doc = JSON.stringify(await getDoc(page), null, 2);
47 expect(doc).toMatchSnapshot(`${name}.json`);
48}
49
50/**
51 * Programmatically move cursor to end of the current block content.

Callers 11

slashmenu.test.tsFile · 0.85
dragdrop.test.tsFile · 0.85
draghandle.test.tsFile · 0.85
tables.test.tsFile · 0.85
images.test.tsFile · 0.85
copypaste.test.tsFile · 0.85

Calls 1

getDocFunction · 0.85

Tested by

no test coverage detected