chore(8.0): final pre-RC1 sweep — API consistency, named errors, orphans, zero-cast codebase
This commit is contained in:
parent
970e08c466
commit
1f7e365a4e
237 changed files with 1951 additions and 49413 deletions
|
|
@ -138,7 +138,7 @@ describe('Transactions + Distributed Storage Integration', () => {
|
|||
|
||||
// Verify relationships
|
||||
for (let i = 0; i < entities.length - 1; i++) {
|
||||
const relations = await brain.getRelations({ from: entities[i] })
|
||||
const relations = await brain.related({ from: entities[i] })
|
||||
expect(relations).toHaveLength(1)
|
||||
}
|
||||
})
|
||||
|
|
@ -260,7 +260,7 @@ describe('Transactions + Distributed Storage Integration', () => {
|
|||
expect(entity).toBeTruthy()
|
||||
|
||||
// Delete atomically
|
||||
await brain.delete(id)
|
||||
await brain.remove(id)
|
||||
|
||||
// Verify deleted
|
||||
entity = await brain.get(id)
|
||||
|
|
@ -286,14 +286,14 @@ describe('Transactions + Distributed Storage Integration', () => {
|
|||
})
|
||||
|
||||
// Delete first entity (should delete relationships)
|
||||
await brain.delete(id1)
|
||||
await brain.remove(id1)
|
||||
|
||||
// Verify entity deleted
|
||||
const entity1 = await brain.get(id1)
|
||||
expect(entity1).toBeNull()
|
||||
|
||||
// Verify relationships deleted
|
||||
const relations = await brain.getRelations({ from: id1 })
|
||||
const relations = await brain.related({ from: id1 })
|
||||
expect(relations).toHaveLength(0)
|
||||
|
||||
// Entity 2 should still exist
|
||||
|
|
@ -325,7 +325,7 @@ describe('Transactions + Distributed Storage Integration', () => {
|
|||
expect(entity?.data.name).toBe('Updated via Adapter')
|
||||
|
||||
// Delete entity
|
||||
await brain.delete(id)
|
||||
await brain.remove(id)
|
||||
const deletedEntity = await brain.get(id)
|
||||
expect(deletedEntity).toBeNull()
|
||||
})
|
||||
|
|
@ -359,7 +359,7 @@ describe('Transactions + Distributed Storage Integration', () => {
|
|||
// Verify all operations succeeded (regardless of latency)
|
||||
const entity1 = await brain.get(id1)
|
||||
const entity2 = await brain.get(id2)
|
||||
const relations = await brain.getRelations({ from: id1 })
|
||||
const relations = await brain.related({ from: id1 })
|
||||
|
||||
expect(entity1).toBeTruthy()
|
||||
expect(entity2).toBeTruthy()
|
||||
|
|
|
|||
|
|
@ -71,7 +71,7 @@ describe('Transactions + Sharding Integration', () => {
|
|||
// Verify all entities exist
|
||||
const entity1 = await brain.get(id1)
|
||||
const entity2 = await brain.get(id2)
|
||||
const relations = await brain.getRelations({ from: id1 })
|
||||
const relations = await brain.related({ from: id1 })
|
||||
|
||||
expect(entity1).toBeTruthy()
|
||||
expect(entity2).toBeTruthy()
|
||||
|
|
@ -213,9 +213,9 @@ describe('Transactions + Sharding Integration', () => {
|
|||
})
|
||||
|
||||
// Verify all relationships exist
|
||||
const relations0 = await brain.getRelations({ from: entities[0].id })
|
||||
const relations1 = await brain.getRelations({ from: entities[1].id })
|
||||
const relations2 = await brain.getRelations({ from: entities[2].id })
|
||||
const relations0 = await brain.related({ from: entities[0].id })
|
||||
const relations1 = await brain.related({ from: entities[1].id })
|
||||
const relations2 = await brain.related({ from: entities[2].id })
|
||||
|
||||
expect(relations0).toHaveLength(1)
|
||||
expect(relations1).toHaveLength(1)
|
||||
|
|
@ -249,7 +249,7 @@ describe('Transactions + Sharding Integration', () => {
|
|||
})
|
||||
|
||||
// Delete first entity (should also delete relationship)
|
||||
await brain.delete(id1)
|
||||
await brain.remove(id1)
|
||||
|
||||
// Verify entity deleted from shard G
|
||||
const entity1 = await brain.get(id1)
|
||||
|
|
@ -260,7 +260,7 @@ describe('Transactions + Sharding Integration', () => {
|
|||
expect(entity2).toBeTruthy()
|
||||
|
||||
// Relationship should be deleted
|
||||
const relations = await brain.getRelations({ from: id1 })
|
||||
const relations = await brain.related({ from: id1 })
|
||||
expect(relations).toHaveLength(0)
|
||||
})
|
||||
})
|
||||
|
|
|
|||
|
|
@ -272,8 +272,8 @@ describe('Transactions + TypeAware Storage Integration', () => {
|
|||
})
|
||||
|
||||
// Verify relationships exist
|
||||
const personRelations = await brain.getRelations({ from: personId })
|
||||
const orgRelations = await brain.getRelations({ from: orgId })
|
||||
const personRelations = await brain.related({ from: personId })
|
||||
const orgRelations = await brain.related({ from: orgId })
|
||||
|
||||
expect(personRelations).toHaveLength(2)
|
||||
expect(orgRelations).toHaveLength(1)
|
||||
|
|
@ -310,7 +310,7 @@ describe('Transactions + TypeAware Storage Integration', () => {
|
|||
})
|
||||
|
||||
// Delete person (should cascade delete relationships)
|
||||
await brain.delete(personId)
|
||||
await brain.remove(personId)
|
||||
|
||||
// Verify person deleted
|
||||
const person = await brain.get(personId)
|
||||
|
|
@ -323,7 +323,7 @@ describe('Transactions + TypeAware Storage Integration', () => {
|
|||
expect(task).toBeTruthy()
|
||||
|
||||
// Verify relationships from person are deleted
|
||||
const relations = await brain.getRelations({ from: personId })
|
||||
const relations = await brain.related({ from: personId })
|
||||
expect(relations).toHaveLength(0)
|
||||
})
|
||||
})
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue