UNPKG

1.4 kBTypeScriptView Raw
1import { TextRange } from '../TextRange';
2import { DocNode } from '../../nodes';
3import { ParserContext } from '../ParserContext';
4import { TSDocConfiguration } from '../../configuration/TSDocConfiguration';
5interface ISnapshotItem {
6 kind: string;
7 errorMessage?: string;
8 errorLocation?: string;
9 errorLocationPrecedingToken?: string;
10 nodeExcerpt?: string;
11 nodeSpacing?: string;
12 nodePlainText?: string;
13 nodes?: ISnapshotItem[];
14}
15export declare class TestHelpers {
16 /**
17 * Pretty print a line with "<" and ">" markers to indicate a text range.
18 */
19 static formatLineSpan(line: TextRange, range: TextRange): string;
20 /**
21 * Workaround various characters that get ugly escapes in Jest snapshots
22 */
23 static getEscaped(s: string): string;
24 /**
25 * Main harness for tests under `./parser/*`.
26 */
27 static parseAndMatchNodeParserSnapshot(buffer: string, config?: TSDocConfiguration): void;
28 /**
29 * Main harness for tests under `./details/*`.
30 */
31 static parseAndMatchDocCommentSnapshot(buffer: string, configuration?: TSDocConfiguration): ParserContext;
32 /**
33 * Render a nice Jest snapshot object for a DocNode tree.
34 */
35 static getDocNodeSnapshot(docNode: DocNode | undefined): ISnapshotItem | undefined;
36 private static _getTokenCoverageGapsSnapshot;
37}
38export {};
39//# sourceMappingURL=TestHelpers.d.ts.map
\No newline at end of file