Add plugin platform with modular backend and frontend registry.
Split graph/import/meta into Django apps, add API v1 with OpenAPI and pytest, and introduce plugin registry with the tags reference plugin on both FE and BE. Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
@@ -0,0 +1,26 @@
|
||||
import { describe, it, expect, vi } from 'vitest'
|
||||
|
||||
vi.mock('../../infrastructure/config/dataMode', () => ({
|
||||
isLocalMode: () => true,
|
||||
}))
|
||||
|
||||
vi.mock('../../core/pluginRegistry', () => ({
|
||||
applyGraphExtensions: (_kind, payload) => payload,
|
||||
}))
|
||||
|
||||
vi.mock('../usecases/graph', () => ({
|
||||
getGraphBundle: vi.fn(async () => ({
|
||||
nodes: [{ id: '1', label: 'A' }],
|
||||
edges: [],
|
||||
relationTypes: [],
|
||||
})),
|
||||
}))
|
||||
|
||||
describe('graphDataService', () => {
|
||||
it('fetchGraphBundle returns nodes from local use case', async () => {
|
||||
const { fetchGraphBundle } = await import('./graphDataService.js')
|
||||
const bundle = await fetchGraphBundle()
|
||||
expect(bundle.nodes).toHaveLength(1)
|
||||
expect(bundle.nodes[0].label).toBe('A')
|
||||
})
|
||||
})
|
||||
Reference in New Issue
Block a user