Add direct reducer tests for encounterReducer
Exports encounterReducer and EncounterState for testing. Adds 26 pure-function tests covering all action types: CRUD, turn navigation, HP/AC/conditions, undo/redo, bestiary add with auto-numbering, player character add, import, and event accumulation. Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
This commit is contained in:
@@ -81,7 +81,7 @@ type EncounterAction =
|
||||
undoRedoState: UndoRedoState;
|
||||
};
|
||||
|
||||
interface EncounterState {
|
||||
export interface EncounterState {
|
||||
readonly encounter: Encounter;
|
||||
readonly undoRedoState: UndoRedoState;
|
||||
readonly events: readonly DomainEvent[];
|
||||
@@ -268,7 +268,7 @@ function handleAddFromPlayerCharacter(
|
||||
|
||||
// -- Reducer --
|
||||
|
||||
function encounterReducer(
|
||||
export function encounterReducer(
|
||||
state: EncounterState,
|
||||
action: EncounterAction,
|
||||
): EncounterState {
|
||||
|
||||
Reference in New Issue
Block a user