Skip to content

session.ts has no tests and needs no browser #5

Description

@cgreening

npm run coverage reports six files never executed. Four are genuinely
platform (browser-shell.ts, main.ts, manual.ts, viewer/main.ts) and one
is types-only (chart-state.ts).

src/game/session.ts (47 lines) is the real gap. It has zero DOM
references and holds SessionState — every flight flag and timer, walked
generically by the snapshot. It is exactly the kind of thing that gets a field
added and silently unsaved, which this project has shipped five times.

test/snapshot.test.ts covers the walk; nothing covers freshSession() or the
defaults themselves.

Done when: a test asserts every SessionState field starts at the value a
leg begins on, and that a fresh session and a restored one agree.

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions