@jest/test-result
- Version 30.4.1
- Published
- 18.3 kB
- 4 dependencies
- MIT license
Install
npm i @jest/test-resultyarn add @jest/test-resultpnpm add @jest/test-resultOverview
Overview not available.
Index
Functions
Type Aliases
- AggregatedResult
- AggregatedResultWithoutCoverage
- AssertionLocation
- AssertionResult
- CodeCoverageFormatter
- CodeCoverageReporter
- FailedAssertion
- FormattedAssertionResult
- FormattedTestResult
- FormattedTestResults
- RuntimeTransformResult
- SerializableError
- SnapshotSummary
- Status
- Suite
- Test
- TestCaseResult
- TestContext
- TestEvents
- TestFileEvent
- TestResult
- TestResultsProcessor
- UncheckedSnapshot
- V8CoverageResult
Functions
function addResult
addResult: (aggregatedResults: AggregatedResult, testResult: TestResult) => void;function buildFailureTestResult
buildFailureTestResult: ( testPath: string, err: TestResult_2.SerializableError) => TestResult;function createEmptyTestResult
createEmptyTestResult: () => TestResult;function formatTestResults
formatTestResults: ( results: AggregatedResult, codeCoverageFormatter?: CodeCoverageFormatter, reporter?: CodeCoverageReporter) => FormattedTestResults;function makeEmptyAggregatedTestResult
makeEmptyAggregatedTestResult: () => AggregatedResult;Type Aliases
type AggregatedResult
type AggregatedResult = AggregatedResultWithoutCoverage & { coverageMap?: CoverageMap | null;};type AggregatedResultWithoutCoverage
type AggregatedResultWithoutCoverage = { numFailedTests: number; numFailedTestSuites: number; numPassedTests: number; numPassedTestSuites: number; numPendingTests: number; numTodoTests: number; numPendingTestSuites: number; numRuntimeErrorTestSuites: number; numTotalTests: number; numTotalTestSuites: number; openHandles: Array<Error>; snapshot: SnapshotSummary; startTime: number; success: boolean; testResults: Array<TestResult>; wasInterrupted: boolean; runExecError?: SerializableError;};type AssertionLocation
type AssertionLocation = { fullName: string; path: string;};type AssertionResult
type AssertionResult = TestResult_2.AssertionResult;type CodeCoverageFormatter
type CodeCoverageFormatter = ( coverage: CoverageMapData | null | undefined, reporter: CodeCoverageReporter) => Record<string, unknown> | null | undefined;type CodeCoverageReporter
type CodeCoverageReporter = unknown;type FailedAssertion
type FailedAssertion = { matcherName?: string; message?: string; actual?: unknown; pass?: boolean; passed?: boolean; expected?: unknown; isNot?: boolean; stack?: string; error?: unknown;};type FormattedAssertionResult
type FormattedAssertionResult = Pick< AssertionResult, 'ancestorTitles' | 'fullName' | 'location' | 'status' | 'title' | 'duration'> & { failureMessages: AssertionResult['failureMessages'] | null;};type FormattedTestResult
type FormattedTestResult = { message: string; name: string; summary: string; status: 'failed' | 'passed' | 'skipped' | 'focused'; startTime: number; endTime: number; coverage: unknown; assertionResults: Array<FormattedAssertionResult>;};type FormattedTestResults
type FormattedTestResults = { coverageMap?: CoverageMap | null | undefined; numFailedTests: number; numFailedTestSuites: number; numPassedTests: number; numPassedTestSuites: number; numPendingTests: number; numPendingTestSuites: number; numRuntimeErrorTestSuites: number; numTotalTests: number; numTotalTestSuites: number; snapshot: SnapshotSummary; startTime: number; success: boolean; testResults: Array<FormattedTestResult>; wasInterrupted: boolean;};type RuntimeTransformResult
type RuntimeTransformResult = TransformTypes.TransformResult;type SerializableError
type SerializableError = TestResult_2.SerializableError;type SnapshotSummary
type SnapshotSummary = { added: number; didUpdate: boolean; failure: boolean; filesAdded: number; filesRemoved: number; filesRemovedList: Array<string>; filesUnmatched: number; filesUpdated: number; matched: number; total: number; unchecked: number; uncheckedKeysByFile: Array<UncheckedSnapshot>; unmatched: number; updated: number;};type Status
type Status = AssertionResult['status'];type Suite
type Suite = { title: string; suites: Array<Suite>; tests: Array<AssertionResult>;};type Test
type Test = { context: TestContext; duration?: number; path: string;};type TestCaseResult
type TestCaseResult = AssertionResult & { startedAt?: number | null;};type TestContext
type TestContext = { config: Config.ProjectConfig; hasteFS: IHasteFS; moduleMap: IModuleMap; resolver: Resolver;};type TestEvents
type TestEvents = { 'test-file-start': [Test]; 'test-file-success': [Test, TestResult]; 'test-file-failure': [Test, SerializableError]; 'test-case-start': [string, Circus.TestCaseStartInfo]; 'test-case-result': [string, TestCaseResult];};type TestFileEvent
type TestFileEvent<T extends keyof TestEvents = keyof TestEvents> = ( eventName: T, args: TestEvents[T]) => unknown;type TestResult
type TestResult = { console?: ConsoleBuffer; coverage?: CoverageMapData; displayName?: Config.DisplayName; /** * Whether [`test.failing()`](https://jestjs.io/docs/api#testfailingname-fn-timeout) * was used. */ failing?: boolean; failureMessage?: string | null; leaks: boolean; memoryUsage?: number; numFailingTests: number; numPassingTests: number; numPendingTests: number; numTodoTests: number; openHandles: Array<Error>; perfStats: { end: number; loadTestEnvironmentEnd: number; loadTestEnvironmentStart: number; runtime: number; setupAfterEnvEnd: number; setupAfterEnvStart: number; setupFilesEnd: number; setupFilesStart: number; slow: boolean; start: number; }; skipped: boolean; snapshot: { added: number; fileDeleted: boolean; matched: number; unchecked: number; uncheckedKeys: Array<string>; unmatched: number; updated: number; }; testExecError?: SerializableError; testFilePath: string; testResults: Array<AssertionResult>; v8Coverage?: V8CoverageResult;};type TestResultsProcessor
type TestResultsProcessor = ( results: AggregatedResult) => AggregatedResult | Promise<AggregatedResult>;type UncheckedSnapshot
type UncheckedSnapshot = { filePath: string; keys: Array<string>;};type V8CoverageResult
type V8CoverageResult = Array<{ codeTransformResult: RuntimeTransformResult | undefined; result: V8Coverage[number];}>;Package Files (1)
Dependencies (4)
Dev Dependencies (2)
Peer Dependencies (0)
No peer dependencies.
Badge
To add a badge like this oneto your package's README, use the codes available below.
You may also use Shields.io to create a custom badge linking to https://www.jsdocs.io/package/@jest/test-result.
- Markdown[](https://www.jsdocs.io/package/@jest/test-result)
- HTML<a href="https://www.jsdocs.io/package/@jest/test-result"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>
- Updated .
Package analyzed in 3291 ms. - Missing or incorrect documentation? Open an issue for this package.
