Skip to content

fix(test): pass getInsertionRange in the image-insert access test - #25351

Merged
Jinwoo-H merged 1 commit into
mainfrom
fix/editor-image-insert-test-insertion-range
Oct 5, 2026
Merged

Jinwoo-H merged 1 commit into
mainfrom
fix/editor-image-insert-test-insertion-range

Conversation

@Jinwoo-H

@Jinwoo-H Jinwoo-H commented Oct 5, 2026 •

Copy link
Copy Markdown
Contributor
Files Added Deleted Net
Test 1 $\color{#1a7f37}{\Huge{\mathbf{+}}}$​1 $\color{#cf222e}{\Huge{\mathbf{−}}}$​1 0
Prod 0 0 0 0

ELI5

Main's typecheck is red: two PRs that landed close together disagree about one test argument. This updates the test to the new argument.

What Changed

rich-markdown-image-insert.test.ts: the "declares document-folder access" test passed insertPos: 4, which #25176 replaced with getInsertionRange. It now passes getInsertionRange: () => ({ from: 4, to: 4, requestOrder: 1 }), the same value the file's other tests use. Test-only.

Why

#24489 added the test after #25176 changed the function's arguments, so pnpm run typecheck fails on main and on every open PR's CI.

Linked Issue

Maintainer PR; fixes main's typecheck (TS2353 in rich-markdown-image-insert.test.ts).

Visual Proof

N/A: test-only change.

Testing

  • pnpm run typecheck passes.

  • rich-markdown-image-insert.test.ts: 7/7 pass.

  • I manually tested these changes locally

  • Automated tests added/updated, or explained why not below

Agent skill upstream boundary

  • Not applicable, or this change follows docs/reference/agent-skill-sharing-upstream-boundary.md and copies or mechanically translates no upstream skill-installer source, tests, fixtures, registry entries, path tables, comments, or documentation.

Checklist

  • This PR is small and focused
  • I explained what changed and why (ELI5, the user-facing before/after, the mechanism, and why over the alternatives)
  • Before/after screenshots or videos attached for UI changes, or N/A with reason
  • Self-reviewed for correctness, security, and performance
  • Cross-platform, SSH/remote, and path/shortcut impact considered (or N/A)
  • pnpm lint, pnpm typecheck, pnpm test, and pnpm build pass (or CI will cover; local preferred)

#25176 replaced insertPos with getInsertionRange and #24489 added a test
using insertPos; together they broke main's typecheck.
@Jinwoo-H
Jinwoo-H merged commit 6f8eee3 into main Oct 5, 2026
3 of 4 checks passed
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