Skip to content

HAR-7108 - SuperDoc docx editor (super editor) package#3

Closed
harbournick wants to merge 3 commits intomainfrom
nick/super-editor
Closed

HAR-7108 - SuperDoc docx editor (super editor) package#3
harbournick wants to merge 3 commits intomainfrom
nick/super-editor

Conversation

@harbournick
Copy link
Copy Markdown
Collaborator

No description provided.

@harbournick harbournick self-assigned this Jun 14, 2024
tupizz added a commit that referenced this pull request Apr 16, 2026
…nt tests

Applies testing-excellence principles to the SD-2563 test suite:

1. Remove dead mock stubs (Iron Law #3: never mock what you don't understand).
   11 test files carried vi.mock('@superdoc/layout-resolved') stubs that no
   test depends on — PresentationEditor imports the module, but these tests
   don't exercise paths that call it. Verified by removing and running the
   full suite: all 11348 tests pass without the stubs.

2. Kept the stubs in 2 files whose tests genuinely depend on controlled
   resolveLayout behavior (PresentationEditor.footnotesPmMarkers and
   PresentationEditor.sectionPageStyles).

3. Added HeaderFooterSessionManager.alignment.test.ts covering the two
   previously-untested risk areas:
   - rId-based path delivers items aligned 1:1 with fragments
     (multi-section documents — uses real resolveHeaderFooterLayout)
   - Length-mismatch guard drops items and emits a warning when resolved
     and fragment counts diverge (proves the runtime safety net works)

Net: -44 lines of dead mock boilerplate, +190 lines of real test coverage.
Total super-editor tests: 11348 -> 11350.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant