• Version 27.5.1
  • Published
  • 17.1 kB
  • 4 dependencies
  • MIT license


npm i @jest/test-result
yarn add @jest/test-result
pnpm add @jest/test-result


Overview not available.



function addResult

addResult: (aggregatedResults: AggregatedResult, testResult: TestResult) => void;

    function buildFailureTestResult

    buildFailureTestResult: (
    testPath: Config.Path,
    err: TestResult.SerializableError
    ) => TestResult;

      function createEmptyTestResult

      createEmptyTestResult: () => TestResult;

        function formatTestResults

        formatTestResults: (
        results: AggregatedResult,
        codeCoverageFormatter?: CodeCoverageFormatter,
        reporter?: CodeCoverageReporter
        ) => FormattedTestResults;

          function makeEmptyAggregatedTestResult

          makeEmptyAggregatedTestResult: () => AggregatedResult;


            interface RuntimeTransformResult

            interface RuntimeTransformResult extends TransformTypes.TransformResult {}

              property wrapperLength

              wrapperLength: number;

                Type Aliases

                type AggregatedResult

                type AggregatedResult = AggregatedResultWithoutCoverage & {
                coverageMap?: CoverageMap | null;

                  type AssertionLocation

                  type AssertionLocation = {
                  fullName: string;
                  path: string;

                    type AssertionResult

                    type AssertionResult = TestResult.AssertionResult;

                      type FailedAssertion

                      type FailedAssertion = {
                      matcherName?: string;
                      message?: string;
                      actual?: unknown;
                      pass?: boolean;
                      passed?: boolean;
                      expected?: unknown;
                      isNot?: boolean;
                      stack?: string;
                      error?: unknown;

                        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 Milliseconds

                          type Milliseconds = TestResult.Milliseconds;

                            type SerializableError

                            type SerializableError = TestResult.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: Context;
                                    duration?: number;
                                    path: Config.Path;

                                      type TestCaseResult

                                      type TestCaseResult = AssertionResult;

                                        type TestEvents

                                        type TestEvents = {
                                        'test-file-start': [Test];
                                        'test-file-success': [Test, TestResult];
                                        'test-file-failure': [Test, SerializableError];
                                        'test-case-result': [Config.Path, AssertionResult];

                                          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;
                                            failureMessage?: string | null;
                                            leaks: boolean;
                                            memoryUsage?: Bytes;
                                            numFailingTests: number;
                                            numPassingTests: number;
                                            numPendingTests: number;
                                            numTodoTests: number;
                                            openHandles: Array<Error>;
                                            perfStats: {
                                            end: Milliseconds;
                                            runtime: Milliseconds;
                                            slow: boolean;
                                            start: Milliseconds;
                                            skipped: boolean;
                                            snapshot: {
                                            added: number;
                                            fileDeleted: boolean;
                                            matched: number;
                                            unchecked: number;
                                            uncheckedKeys: Array<string>;
                                            unmatched: number;
                                            updated: number;
                                            testExecError?: SerializableError;
                                            testFilePath: Config.Path;
                                            testResults: Array<AssertionResult>;
                                            v8Coverage?: V8CoverageResult;

                                              type TestResultsProcessor

                                              type TestResultsProcessor = (results: AggregatedResult) => AggregatedResult;

                                                type V8CoverageResult

                                                type V8CoverageResult = Array<{
                                                codeTransformResult: RuntimeTransformResult | undefined;
                                                result: V8Coverage[number];

                                                  Package Files (4)

                                                  Dependencies (4)

                                                  Dev Dependencies (0)

                                                  No dev dependencies.

                                                  Peer Dependencies (0)

                                                  No peer dependencies.


                                                  To add a badge like this onejsDocs.io badgeto 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
                                                  • 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>