test(8.0): use valid camelCase VerbType values in test-factory
createRelateParams / createTestRelation / createKnowledgeGraphTestData cast
PascalCase strings ('RelatedTo', 'DependsOn', 'Contains') `as VerbType` — the
cast hid the mismatch from TS, but 8.0's verb-type validation rejects them at
runtime ("invalid VerbType"). Corrected to the real enum values (relatedTo,
dependsOn, contains), matching the already-correct social-network helpers.
Unblocks find-unified-integration setup (59 failing → 40 passing).
This commit is contained in:
parent
dc94af3a6a
commit
e31ba894f8
1 changed files with 5 additions and 5 deletions
|
|
@ -155,7 +155,7 @@ export function createRelateParams(from: string, to: string, overrides: Partial<
|
||||||
return {
|
return {
|
||||||
from,
|
from,
|
||||||
to,
|
to,
|
||||||
type: 'RelatedTo' as VerbType,
|
type: 'relatedTo' as VerbType,
|
||||||
weight: 1.0,
|
weight: 1.0,
|
||||||
metadata: generateTestMetadata(),
|
metadata: generateTestMetadata(),
|
||||||
service: 'test',
|
service: 'test',
|
||||||
|
|
@ -259,10 +259,10 @@ export function createKnowledgeGraphTestData() {
|
||||||
]
|
]
|
||||||
|
|
||||||
const relations = [
|
const relations = [
|
||||||
createTestRelation({ from: 'earth', to: 'sun', type: 'DependsOn' as VerbType }),
|
createTestRelation({ from: 'earth', to: 'sun', type: 'dependsOn' as VerbType }),
|
||||||
createTestRelation({ from: 'moon', to: 'earth', type: 'DependsOn' as VerbType }),
|
createTestRelation({ from: 'moon', to: 'earth', type: 'dependsOn' as VerbType }),
|
||||||
createTestRelation({ from: 'mars', to: 'sun', type: 'DependsOn' as VerbType }),
|
createTestRelation({ from: 'mars', to: 'sun', type: 'dependsOn' as VerbType }),
|
||||||
createTestRelation({ from: 'earth', to: 'moon', type: 'Contains' as VerbType }),
|
createTestRelation({ from: 'earth', to: 'moon', type: 'contains' as VerbType }),
|
||||||
]
|
]
|
||||||
|
|
||||||
return { entities, relations }
|
return { entities, relations }
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue