MCPcopy
hub / github.com/tldraw/tldraw / expectValid

Function expectValid

packages/dotcom-shared/src/mutators.test.ts:283–285  ·  view source on GitHub ↗
(fn: () => Promise<any>)

Source from the content-addressed store, hash-verified

281}
282
283async function expectValid(fn: () => Promise<any>) {
284 await expect(fn()).resolves.not.toThrow()
285}
286
287function expectForbidden(fn: () => Promise<any>) {
288 return expect(fn()).rejects.toThrow(ZErrorCode.forbidden)

Callers 1

mutators.test.tsFile · 0.85

Calls 1

fnFunction · 0.50

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…