Skip to content

code-editor and code-debugger component specs leave most class logic uncovered #5190

@Yicong-Huang

Description

@Yicong-Huang

Task Summary

code-debugger.component.ts sits at ~38% line coverage and code-editor.component.ts at ~35%, despite each having a sibling spec. The gaps are concentrated in two places:

  • code-debugger registers a Y.Map observer in registerBreakpointRenderingHandler that drives every breakpoint render path (create / remove / hit-flip / condition-change / rerender). The existing spec exercises the status-change observer alongside it but never the Y.Map path — and the spec's debugState is new Y.Map<…>() standalone, which silently never fires observers because the map is not attached to a Y.Doc.
  • code-editor has class-level methods that don't depend on a real Monaco editor (file-suffix derivation, focus highlighting, accept/reject of AI annotation suggestions, AI-gate routing) which the existing spec hasn't reached.

Add tests for the testable surface, fix the detached-Y.Map setup so observer-based assertions work, and document the resulting coverage lift in the PR.

Task Type

  • Testing / QA

Metadata

Metadata

Assignees

Labels

No labels
No labels

Type

No fields configured for Task.

Projects

No projects

Milestone

No milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions