All checks were successful
Deploy Development / deploy (push) Successful in 50s
Test Suite / pytest-backend (push) Successful in 2m18s
Test Suite / lint-backend (push) Successful in 3s
Test Suite / compose-smoke (push) Has been skipped
Test Suite / k6 /api/health Baseline (push) Successful in 18s
Test Suite / playwright-smoke (push) Successful in 13s
Co-authored-by: Cursor <cursoragent@cursor.com>
35 lines
1.1 KiB
JavaScript
35 lines
1.1 KiB
JavaScript
import { describe, expect, it } from 'vitest'
|
|
import {
|
|
DEFERRED_TOPOLOGY_EDGE_KINDS,
|
|
DESIGNER_EDGE_KINDS,
|
|
edgeKindNeedsGroupKey,
|
|
resolveDependencyEndpoints,
|
|
} from './gateGraphTopology.js'
|
|
|
|
describe('gateGraphTopology', () => {
|
|
it('includes topology kinds in designer', () => {
|
|
expect(DESIGNER_EDGE_KINDS).toContain('requires')
|
|
expect(DESIGNER_EDGE_KINDS).toContain('parallel_group')
|
|
expect(DESIGNER_EDGE_KINDS).toContain('optional_branch')
|
|
for (const kind of DEFERRED_TOPOLOGY_EDGE_KINDS) {
|
|
expect(DESIGNER_EDGE_KINDS).toContain(kind)
|
|
}
|
|
})
|
|
|
|
it('requires group_key for parallel_group', () => {
|
|
expect(edgeKindNeedsGroupKey('parallel_group')).toBe(true)
|
|
expect(edgeKindNeedsGroupKey('requires')).toBe(false)
|
|
})
|
|
|
|
it('resolves requires edge direction for join semantics', () => {
|
|
expect(resolveDependencyEndpoints('requires', 'a', 'b')).toEqual({
|
|
from_item_id: 'b',
|
|
to_item_id: 'a',
|
|
})
|
|
expect(resolveDependencyEndpoints('optional_branch', 'a', 'b')).toEqual({
|
|
from_item_id: 'a',
|
|
to_item_id: 'b',
|
|
})
|
|
})
|
|
})
|