Skip to content

fix(e2e): run complete CLI package - #65

Merged
ekalinin merged 1 commit into
masterfrom
fix/e2e-cli-package
Aug 1, 2026
Merged

fix(e2e): run complete CLI package#65
ekalinin merged 1 commit into
masterfrom
fix/e2e-cli-package

Conversation

@ekalinin

@ekalinin ekalinin commented Aug 1, 2026

Copy link
Copy Markdown
Owner

Summary

Run the complete cmd/gh-md-toc package in the Makefile e2e commands instead of compiling only main.go.

Regression source

The regression was introduced in PR #60.

That PR moved CLI configuration and parseConfig from main.go into a separate config.go file. The Makefile continued to execute:

go run cmd/gh-md-toc/main.go

Running a specific Go file compiles only that file, so config.go was excluded and every e2e command failed with:

cmd/gh-md-toc/main.go:27:14: undefined: parseConfig

The issue was discovered while validating PR #64 and is intentionally fixed in this separate PR.

Fix

Update all three e2e command variables to run the complete CLI package:

go run ./cmd/${EXEC}

This includes every Go file in cmd/gh-md-toc, including main.go and config.go.

The change covers:

  • local Markdown e2e scenarios
  • raw remote Markdown e2e scenarios
  • GitHub blob URL e2e scenarios

Verification

make e2e passes all nine scenarios:

  • local Markdown with default options
  • local Markdown with depth and escaping options
  • local Markdown with custom indentation
  • raw remote Markdown with default options
  • raw remote Markdown with depth and escaping options
  • raw remote Markdown with custom indentation
  • GitHub blob URL with default options
  • GitHub blob URL with depth and escaping options
  • GitHub blob URL with custom indentation

All generated results match the existing golden files.

@codecov

codecov Bot commented Aug 1, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 80.47%. Comparing base (0eb4977) to head (24f4042).

Additional details and impacted files
@@           Coverage Diff           @@
##           master      #65   +/-   ##
=======================================
  Coverage   80.47%   80.47%           
=======================================
  Files          28       28           
  Lines         712      712           
=======================================
  Hits          573      573           
  Misses         96       96           
  Partials       43       43           

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@ekalinin
ekalinin merged commit 8d888eb into master Aug 1, 2026
6 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