export type TestMetaKind = "test" | "suite"; export type TestMetaField = { key: string; value: string; }; export type TestDocumentMeta = { kind: TestMetaKind; fields: TestMetaField[]; inline: boolean; }; export type TestDocumentStep = { title: string; data: string; expected: string; /** Set when the step is a snippet. */ snippetId?: string; start: number; end: number; }; export type TestDocumentHeading = { line: number; level: number; /** The heading as written, `@tags` included. */ text: string; }; /** * A `*.test.md` file cut at each `` / `` comment. * Line numbers are 0-based; `end` is exclusive. */ export type TestDocumentSection = { /** Null for text above the first comment. */ meta: TestDocumentMeta | null; start: number; /** First line after the comment. */ bodyStart: number; end: number; /** The first `#` or `##` heading: the test or suite title. */ heading: TestDocumentHeading | null; /** The `Steps` heading the steps sit under. */ stepsHeading: TestDocumentHeading | null; steps: TestDocumentStep[]; }; /** Reads a `*.test.md` file with the same parser the editor uses. */ export declare function parseTestDocument(markdown: string): TestDocumentSection[]; /** The value of a meta field, matched by key without case. */ export declare function metaFieldValue(meta: TestDocumentMeta | null | undefined, key: string): string | undefined;