Skip to content

All 26 ignored tests are shopping-list tests; 11 fail when run #415

Closed

Description

@dubadub

Every #[ignore]d test in the Rust suite is a shopping-list test, and most of them fail when actually run. cook shopping-list therefore has effectively no regression coverage.

Current state

$ cargo test
296 passed; 0 failed; 26 ignored

All 26 ignored tests are shopping-list tests:

File Ignored
tests/shopping_list_test.rs 18 — the entire file
tests/snapshot_test.rs 3 — shopping_list_{categorized,json,plain}
tests/output_formats_test.rs 3
tests/cli_integration_test.rs 2

They carry a bare #[ignore] with no reason. Running them shows why:

$ cargo test --test shopping_list_test -- --ignored
7 passed; 11 failed

They assert output the command no longer produces — for example a "Shopping List" header that is not emitted.

Why it matters

shopping_list is among the more intricate commands: recursive reference expansion, aisle and pantry loading, ingredient aggregation with unit conversion, and four output formats. Every other command (recipe, pantry, doctor, search, build, schema output) has real coverage; this one does not.

Suggested direction

Repairing the existing tests means deciding what the output should be, which is a product question rather than a mechanical fix. A cheaper first step is characterization tests that record what the command currently does, so any change becomes visible; the existing assertions can then be revisited deliberately.

Metadata

Metadata

Assignees

No one assigned

    Labels

    help wanted

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions