MCPcopy Create free account
hub / github.com/TanStack/devtools / makeCoreClass

Function makeCoreClass

packages/devtools-utils/src/svelte/panel.test.ts:5–17  ·  view source on GitHub ↗
()

Source from the content-addressed store, hash-verified

3import { createSveltePanel } from './panel'
4import type { DevtoolsPanelProps } from './panel'
5
6// Minimal stand-in for a class-based devtools core.
7function makeCoreClass() {
8 const coreMount =
9 vi.fn<(el: HTMLElement, props: DevtoolsPanelProps) => void>()
10 const coreUnmount = vi.fn<() => void>()
11 const construct = vi.fn<(...args: Array<unknown>) => void>()
12 class Core {
13 mount = coreMount
14 unmount = coreUnmount
15 constructor(...args: Array<unknown>) {
16 construct(...args)
17 }
18 }
19 return { Core, construct, coreMount, coreUnmount }
20}

Callers 1

panel.test.tsFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected