Skip to content

[Repo Assist] test: add ToFsx output-comment, ToPynb execution-output, and LaTeX block tests#1197

Draft
github-actions[bot] wants to merge 2 commits intomainfrom
repo-assist/test-fsx-pynb-latex-coverage-2026-05-03-30d83afa50dbf6b7
Draft

[Repo Assist] test: add ToFsx output-comment, ToPynb execution-output, and LaTeX block tests#1197
github-actions[bot] wants to merge 2 commits intomainfrom
repo-assist/test-fsx-pynb-latex-coverage-2026-05-03-30d83afa50dbf6b7

Conversation

@github-actions
Copy link
Copy Markdown
Contributor

@github-actions github-actions Bot commented May 3, 2026

🤖 This PR was created by Repo Assist, an automated AI assistant.

Summary

Six new unit tests covering previously untested code paths in the Markdown.fs test file:

ToFsx — code-with-output coverage

Test What it verifies
ToFsx emits output comment when code block is followed by an OutputBlock A CodeBlock immediately followed by an OutputBlock produces (* output: ... *) in the .fsx output
ToFsx does not emit output comment when code block has no output A lone CodeBlock (no output) produces no (* output: marker

The (* output: ... *) feature in FsxFormatting.fs had zero test coverage; these tests confirm the existing behaviour.

ToPynb — execution-output coverage

Test What it verifies
ToPynb code block with output produces execution output in notebook A CodeBlock + OutputBlock pair produces an "execute_result" output entry in the JSON notebook
ToPynb empty document produces notebook with empty cells array An empty AST still emits a valid notebook with "nbformat" and "cells"

ToMd — multi-line and equation LaTeX blocks

Test What it verifies
ToMd preserves multi-line LaTeX block with align environment LatexBlock("align", ...) serialises as \begin{align}...\end{align}
ToMd serialises single-line equation block as compact dollar-dollar notation A single-line LatexBlock("equation", ...) serialises as $$...$$, not \begin{equation}

Test Status

  • dotnet build FSharp.Formatting.sln --configuration Release — succeeded (0 errors)
  • dotnet test tests/FSharp.Markdown.Tests352/352 passed (includes 6 new tests)
  • dotnet fantomas tests/FSharp.Markdown.Tests/Markdown.fs — formatted

Generated by 🌈 Repo Assist, see workflow run. Learn more.

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md

Generated by 🌈 Repo Assist, see workflow run. Learn more.

To install this agentic workflow, run

gh aw add githubnext/agentics/workflows/repo-assist.md@96b9d4c39aa22359c0b38265927eadb31dcf4e2a

…ock tests

Six new unit tests in Markdown.fs:
- ToFsx emits output comment when code block is followed by OutputBlock
- ToFsx does not emit output comment when code block has no output
- ToPynb code block with output produces execution output in notebook
- ToPynb empty document produces notebook with empty cells array
- ToMd preserves multi-line LaTeX block with align environment
- ToMd serialises single-line equation block as compact dollar-dollar notation

All 352 tests pass.

Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

0 participants