UNPKG

babel-plugin-tester

Version:
55 lines 3.76 kB
import { $type } from "./constant.js"; import type { MaybePluginTesterTestConfig, PluginTesterTestConfig, PluginTesterTestFixtureConfig, Range } from "./index.js"; /** * A collection of possible errors and warnings. */ export declare const ErrorMessage: { TestEnvironmentUndefinedDescribe: () => string; TestEnvironmentUndefinedIt: () => string; TestEnvironmentNoSnapshotSupport: () => string; TestEnvironmentNoSkipSupport: () => string; TestEnvironmentNoOnlySupport: () => string; BadConfigPluginAndPreset: () => string; BadConfigNoPluginOrPreset: () => string; BadConfigInvalidTitleNumbering: () => string; BadConfigFixturesNotString: () => string; BadConfigInvalidTestsType: () => string; BadConfigInvalidTestsArrayItemType: (index: number) => string; BadConfigInvalidTestsObjectProperty: (title: string) => string; BadConfigInvalidEndOfLine: (endOfLine: unknown) => string; BadEnvironmentVariableRange: (name: string, rangeStr: string, range?: Range) => string; SetupFunctionFailed: (error: unknown) => string; TeardownFunctionFailed: (functionError: unknown, frameworkError?: unknown) => string; ExpectedBabelToThrow: () => string; ExpectedErrorToBeInstanceOf: (expectedError: Function | { name?: string; }) => string; ExpectedThrowsFunctionToReturnTrue: () => string; ExpectedErrorToIncludeString: (resultString: string, expectedError: string) => string; ExpectedErrorToMatchRegExp: (resultString: string, expectedError: RegExp) => string; BabelOutputTypeIsNotString: (rawBabelOutput: unknown) => string; BabelOutputUnexpectedlyEmpty: () => string; AttemptedToSnapshotUnmodifiedBabelOutput: () => string; ExpectedOutputToEqualActual: (testConfig: { [$type]: Exclude<PluginTesterTestConfig[typeof $type], "fixture-object">; } | Pick<PluginTesterTestFixtureConfig, typeof $type | "fixtureOutputBasename">) => string; ExpectedOutputNotToChange: () => string; ValidationFailed: (title: string, message: string) => string; InvalidHasCodeAndCodeFixture: () => string; InvalidHasOutputAndOutputFixture: () => string; InvalidHasExecAndExecFixture: () => string; InvalidHasSnapshotAndOutput: () => string; InvalidHasSnapshotAndExec: () => string; InvalidHasSnapshotAndThrows: () => string; InvalidHasSkipAndOnly: () => string; InvalidHasThrowsAndOutput: (testConfig: Pick<MaybePluginTesterTestConfig, typeof $type>) => "neither `output` nor `outputFixture` can be provided with `throws` or `error`" | "a fixture cannot be provided with `throws` or `error` and also contain an output file"; InvalidHasThrowsAndOutputRaw: () => string; InvalidHasThrowsAndExec: (testConfig: Pick<MaybePluginTesterTestConfig, typeof $type>) => "neither `exec` nor `execFixture` can be provided with `throws` or `error`" | "a fixture cannot be provided with `throws` or `error` and also contain an exec file"; InvalidMissingCodeOrExec: (testConfig: Pick<MaybePluginTesterTestConfig, typeof $type>) => "a string or object with a `code`, `codeFixture`, `fixture`, `exec`, or `execFixture` must be provided" | "a fixture must contain either a code file or an exec file"; InvalidHasExecAndCodeOrOutput: (testConfig: Pick<MaybePluginTesterTestConfig, typeof $type>) => "neither `code`, `codeFixture`, `fixture`, `output`, nor `outputFixture` can be provided with `exec` or `execFixture`" | "a fixture cannot contain both an exec file and a code or output file"; InvalidHasBabelrcButNoFilename: () => string; InvalidThrowsType: () => string; GenericErrorWithPath: (error: unknown, path: string | undefined) => string; PathIsNotAbsolute: (path: string) => string; UnableToDeriveAbsolutePath: (filepath: unknown, filepathName: string, basename: unknown, basenameName: string) => string; };