diff --git a/apps/client/src/features/editor/components/code-block/code-block-view.test.tsx b/apps/client/src/features/editor/components/code-block/code-block-view.test.tsx new file mode 100644 index 00000000..0048b45c --- /dev/null +++ b/apps/client/src/features/editor/components/code-block/code-block-view.test.tsx @@ -0,0 +1,68 @@ +import { describe, it, expect, vi } from "vitest"; +import { render } from "@testing-library/react"; + +// Covers the read-only render branch (PR #278): the language + + {/* In read-only (published) there is no language selector at all — + only the copy button. When editable the selector is hidden until + the block is hovered/focused (or its dropdown is open) via the + `.languageSelect` class (see code-block.module.css). */} + {editor.isEditable && ( +