| 3 | import { createSveltePanel } from './panel' |
| 4 | import type { DevtoolsPanelProps } from './panel' |
| 5 | |
| 6 | // Minimal stand-in for a class-based devtools core. |
| 7 | function 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 | } |