Summary
@import helpers/x.md silently skips the step when the imported helper file contains no ## heading (i.e. it's just prose). No error, no warning — the step simply doesn't run, and everything that depended on it (e.g. a login performed by the helper) is missing, so downstream steps fail far from the real cause.
Environment
@testmuai/kane-cli 0.4.1
Repro
helpers/login.md (prose only — no ## heading):
Open {{TM_BASE_URL}}. Type {{KANE_TEST_USER}} into Email, {{KANE_TEST_PASSWORD}} into Password, click Log In.
settings_test.md:
---
mode: testing
---
# Settings
## Log in
@import helpers/login.md
## Verify
Open {{TM_BASE_URL}}/settings/fields. Verify the "Custom Fields" tab is shown.
Run it. The ## Log in step never executes — the session has only the second step's run dir, and no login/credential actions appear anywhere. The verify step then fails because the app is unauthenticated.
Root cause
A helper is parsed into its own ## steps. A headingless helper yields zero steps, so the import resolves to nothing and the root step is marked skipped (the p.length === 0 → status: "skipped" path). The behaviour is correct internally but completely silent to the author.
Expected
When an @import resolves to zero steps, fail to parse (or emit a loud warning) — e.g. @import helpers/login.md resolved to 0 steps: a helper must contain at least one '## ' step. As-is, the only symptom is a confusing downstream failure.
Impact
Cost hours to diagnose: a shared login helper silently did nothing, so every test that imported it ran unauthenticated and failed on its real assertion with no hint that login never happened.
Summary
@import helpers/x.mdsilently skips the step when the imported helper file contains no##heading (i.e. it's just prose). No error, no warning — the step simply doesn't run, and everything that depended on it (e.g. a login performed by the helper) is missing, so downstream steps fail far from the real cause.Environment
@testmuai/kane-cli0.4.1Repro
helpers/login.md(prose only — no##heading):Open {{TM_BASE_URL}}. Type {{KANE_TEST_USER}} into Email, {{KANE_TEST_PASSWORD}} into Password, click Log In.settings_test.md:Run it. The
## Log instep never executes — the session has only the second step's run dir, and no login/credential actions appear anywhere. The verify step then fails because the app is unauthenticated.Root cause
A helper is parsed into its own
##steps. A headingless helper yields zero steps, so the import resolves to nothing and the root step is markedskipped(thep.length === 0 → status: "skipped"path). The behaviour is correct internally but completely silent to the author.Expected
When an
@importresolves to zero steps, fail to parse (or emit a loud warning) — e.g.@import helpers/login.md resolved to 0 steps: a helper must contain at least one '## ' step. As-is, the only symptom is a confusing downstream failure.Impact
Cost hours to diagnose: a shared login helper silently did nothing, so every test that imported it ran unauthenticated and failed on its real assertion with no hint that login never happened.