Skip to content

latex and typst output have no structural tests #416

Description

@dubadub

The LaTeX and Typst output formats have no tests that pin their structure. The five existing CLI tests assert only that the paper-size and margin substrings appear.

A regression that broke \begin/\end pairing, emitted malformed preamble, or mangled ingredient markup would pass the suite, because nothing inspects the document body.

For comparison, the other formats are better served:

  • -f jsonldtests/schema_output_test.rs, 18 tests parsing the JSON and asserting fields
  • -f human, -f md, -f json, -f yaml — insta snapshots pinning exact output

Suggested direction

One golden-output test per format, snapshotting a representative recipe that exercises ingredients, cookware, timers, sections and metadata. That is enough to catch structural breakage without pinning every formatting detail.

Noticed while extracting the formatters into a library crate, where these two are reachable directly by consumers with no CLI in the loop.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wantedExtra attention is needed

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions