createTestPlugin

function
function createTestPlugin(options: TestPluginOptions): Plugin<{ test?: { assertions?: { dir?: { path: string }; directories?: { path: string }[]; exitCode?: number; file?: { contains?: string; matches?: string; path: string }; files?: { contains?: string; matches?: string; path: string }[]; not?: { exitCode?: number | undefined; stdout?: { contains?: string | undefined; matches?: string | undefined; } | undefined; stderr?: { contains?: string | undefined; matches?: string | undefined; } | undefined; ... 6 more ...; not?: ... | undefined; } | undefined; snapshot?: { path: string; snapshot: string }; snapshots?: { path: string; snapshot: string }[]; stderr?: { contains?: string; matches?: string }; stdout?: { contains?: string; matches?: string } }; name: string; options: { command: string; cwd?: string; env?: Record<string, string>; maintainVTSequences?: boolean; outputSnapshot?: { ansi?: boolean; exitCode?: boolean; path: string; stderr?: boolean; stdout?: boolean }; timeout?: number } } | { name: string; options?: { cwd?: string; env?: Record<string, string>; timeout?: number }; steps: { assertions?: { dir?: { path: string }; directories?: { path: ... }[]; exitCode?: number; file?: { contains?: (...) | (...); matches?: (...) | (...); path: string }; files?: { contains?: ...; matches?: ...; path: ... }[]; not?: { exitCode?: number | undefined; stdout?: { contains?: string | undefined; matches?: string | undefined; } | undefined; stderr?: { contains?: string | undefined; matches?: string | undefined; } | undefined; ... 6 more ...; not?: ... | undefined; } | undefined; snapshot?: { path: string; snapshot: string }; snapshots?: { path: ...; snapshot: ... }[]; stderr?: { contains?: (...) | (...); matches?: (...) | (...) }; stdout?: { contains?: (...) | (...); matches?: (...) | (...) } }; command: string; cwd?: string; env?: Record<string, string>; maintainVTSequences?: boolean; outputSnapshot?: { ansi?: boolean; exitCode?: boolean; path: string; stderr?: boolean; stdout?: boolean }; timeout?: number }[] } | ({ assertions?: { dir?: { path: string }; directories?: { path: ... }[]; exitCode?: number; file?: { contains?: (...) | (...); matches?: (...) | (...); path: string }; files?: { contains?: ...; matches?: ...; path: ... }[]; not?: { exitCode?: number | undefined; stdout?: { contains?: string | undefined; matches?: string | undefined; } | undefined; stderr?: { contains?: string | undefined; matches?: string | undefined; } | undefined; ... 6 more ...; not?: ... | undefined; } | undefined; snapshot?: { path: string; snapshot: string }; snapshots?: { path: ...; snapshot: ... }[]; stderr?: { contains?: (...) | (...); matches?: (...) | (...) }; stdout?: { contains?: (...) | (...); matches?: (...) | (...) } }; name: string; options: { command: string; cwd?: string; env?: Record<string, string>; maintainVTSequences?: boolean; outputSnapshot?: { ansi?: boolean; exitCode?: boolean; path: string; stderr?: boolean; stdout?: boolean }; timeout?: number } } | { name: string; options?: { cwd?: string; env?: Record<string, string>; timeout?: number }; steps: { assertions?: { dir?: (...) | (...); directories?: (...) | (...); exitCode?: (...) | (...); file?: (...) | (...); files?: (...) | (...); not?: { exitCode?: number | undefined; stdout?: { contains?: string | undefined; matches?: string | undefined; } | undefined; stderr?: { contains?: string | undefined; matches?: string | undefined; } | undefined; ... 6 more ...; not?: ... | undefined; } | undefined; snapshot?: (...) | (...); snapshots?: (...) | (...); stderr?: (...) | (...); stdout?: (...) | (...) }; command: string; cwd?: string; env?: Record<string, string>; maintainVTSequences?: boolean; outputSnapshot?: { ansi?: (...) | (...) | (...); exitCode?: (...) | (...) | (...); path: string; stderr?: (...) | (...) | (...); stdout?: (...) | (...) | (...) }; timeout?: number }[] })[] }>

Create the test plugin

PARAMETERS

NAMETYPEDESCRIPTION
optionsTestPluginOptions—

RETURNS

Plugin<{ test?: { assertions?: { dir?: { path: string }; directories?: { path: string }[]; exitCode?: number; file?: { contains?: string; matches?: string; path: string }; files?: { contains?: string; matches?: string; path: string }[]; not?: { exitCode?: number | undefined; stdout?: { contains?: string | undefined; matches?: string | undefined; } | undefined; stderr?: { contains?: string | undefined; matches?: string | undefined; } | undefined; ... 6 more ...; not?: ... | undefined; } | undefined; snapshot?: { path: string; snapshot: string }; snapshots?: { path: string; snapshot: string }[]; stderr?: { contains?: string; matches?: string }; stdout?: { contains?: string; matches?: string } }; name: string; options: { command: string; cwd?: string; env?: Record<string, string>; maintainVTSequences?: boolean; outputSnapshot?: { ansi?: boolean; exitCode?: boolean; path: string; stderr?: boolean; stdout?: boolean }; timeout?: number } } | { name: string; options?: { cwd?: string; env?: Record<string, string>; timeout?: number }; steps: { assertions?: { dir?: { path: string }; directories?: { path: ... }[]; exitCode?: number; file?: { contains?: (...) | (...); matches?: (...) | (...); path: string }; files?: { contains?: ...; matches?: ...; path: ... }[]; not?: { exitCode?: number | undefined; stdout?: { contains?: string | undefined; matches?: string | undefined; } | undefined; stderr?: { contains?: string | undefined; matches?: string | undefined; } | undefined; ... 6 more ...; not?: ... | undefined; } | undefined; snapshot?: { path: string; snapshot: string }; snapshots?: { path: ...; snapshot: ... }[]; stderr?: { contains?: (...) | (...); matches?: (...) | (...) }; stdout?: { contains?: (...) | (...); matches?: (...) | (...) } }; command: string; cwd?: string; env?: Record<string, string>; maintainVTSequences?: boolean; outputSnapshot?: { ansi?: boolean; exitCode?: boolean; path: string; stderr?: boolean; stdout?: boolean }; timeout?: number }[] } | ({ assertions?: { dir?: { path: string }; directories?: { path: ... }[]; exitCode?: number; file?: { contains?: (...) | (...); matches?: (...) | (...); path: string }; files?: { contains?: ...; matches?: ...; path: ... }[]; not?: { exitCode?: number | undefined; stdout?: { contains?: string | undefined; matches?: string | undefined; } | undefined; stderr?: { contains?: string | undefined; matches?: string | undefined; } | undefined; ... 6 more ...; not?: ... | undefined; } | undefined; snapshot?: { path: string; snapshot: string }; snapshots?: { path: ...; snapshot: ... }[]; stderr?: { contains?: (...) | (...); matches?: (...) | (...) }; stdout?: { contains?: (...) | (...); matches?: (...) | (...) } }; name: string; options: { command: string; cwd?: string; env?: Record<string, string>; maintainVTSequences?: boolean; outputSnapshot?: { ansi?: boolean; exitCode?: boolean; path: string; stderr?: boolean; stdout?: boolean }; timeout?: number } } | { name: string; options?: { cwd?: string; env?: Record<string, string>; timeout?: number }; steps: { assertions?: { dir?: (...) | (...); directories?: (...) | (...); exitCode?: (...) | (...); file?: (...) | (...); files?: (...) | (...); not?: { exitCode?: number | undefined; stdout?: { contains?: string | undefined; matches?: string | undefined; } | undefined; stderr?: { contains?: string | undefined; matches?: string | undefined; } | undefined; ... 6 more ...; not?: ... | undefined; } | undefined; snapshot?: (...) | (...); snapshots?: (...) | (...); stderr?: (...) | (...); stdout?: (...) | (...) }; command: string; cwd?: string; env?: Record<string, string>; maintainVTSequences?: boolean; outputSnapshot?: { ansi?: (...) | (...) | (...); exitCode?: (...) | (...) | (...); path: string; stderr?: (...) | (...) | (...); stdout?: (...) | (...) | (...) }; timeout?: number }[] })[] }>