-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Actor relation to faction utils moved. Added tests for actor relation…
… utils. Added mock actor in registry/client/server utility. Mocks extended.
- Loading branch information
Showing
13 changed files
with
135 additions
and
49 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
export * from "@/engine/core/utils/object/object_general"; | ||
export * from "@/engine/core/utils/object/object_find"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,3 +1,4 @@ | ||
export * from "@/fixtures/engine/mocks/registry.mocks"; | ||
export * from "@/fixtures/engine/mocks/scheme.mocks"; | ||
export * from "@/fixtures/engine/mocks/squads.mocks"; | ||
export * from "@/fixtures/engine/mocks/scheme.mocks"; | ||
export * from "@/fixtures/engine/mocks/squads.mocks"; |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
import { IRegistryObjectState, registerActor } from "@/engine/core/database"; | ||
import { ClientObject, ServerActorObject } from "@/engine/lib/types"; | ||
import { mockActorClientGameObject, mockServerAlifeCreatureActor } from "@/fixtures/xray/mocks/objects"; | ||
|
||
export interface IMockActorDetails { | ||
actorClientObject: ClientObject; | ||
actorServerObject: ServerActorObject; | ||
actorState: IRegistryObjectState; | ||
} | ||
|
||
/** | ||
* Mock actor client/server side. | ||
*/ | ||
export function mockRegisteredActor( | ||
actorClientPartial: Partial<ClientObject> = {}, | ||
actorServerPartial: Partial<ServerActorObject> = {} | ||
): IMockActorDetails { | ||
const actorClientObject: ClientObject = mockActorClientGameObject(actorClientPartial); | ||
const actorServerObject: ServerActorObject = mockServerAlifeCreatureActor(actorServerPartial); | ||
const actorState: IRegistryObjectState = registerActor(actorClientObject); | ||
|
||
return { actorClientObject, actorServerObject, actorState }; | ||
} |
13 changes: 10 additions & 3 deletions
13
src/fixtures/xray/mocks/interface/relationRegistryInterface.mock.ts
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters