jest-jasmine2

  • Version 29.7.0
  • Published
  • 119 kB
  • 17 dependencies
  • MIT license

Install

npm i jest-jasmine2
yarn add jest-jasmine2
pnpm add jest-jasmine2

Overview

Overview not available.

Index

Functions

function createSpy

createSpy: (name: string, originalFn: Fn) => Spy;

    function expectationResultFactory

    expectationResultFactory: (
    options: Options,
    initError?: Error
    ) => FailedAssertion;

      function jasmine2

      jasmine2: (
      globalConfig: Config.GlobalConfig,
      config: Config.ProjectConfig,
      environment: JestEnvironment,
      runtime: Runtime,
      testPath: string
      ) => Promise<TestResult>;

        function jasmineEnv

        jasmineEnv: (
        j$: Jasmine
        ) => new () => {
        specFilter: (spec: Spec) => boolean;
        catchExceptions: (value: unknown) => boolean;
        throwOnExpectationFailure: (value: unknown) => void;
        catchingExceptions: () => boolean;
        topSuite: () => Suite;
        fail: (error: Error | AssertionErrorWithStack) => void;
        pending: (message: string) => void;
        afterAll: (afterAllFunction: QueueableFn['fn'], timeout?: number) => void;
        fit: (
        description: Circus.TestNameLike,
        fn: QueueableFn['fn'],
        timeout?: number
        ) => Spec;
        throwingExpectationFailures: () => boolean;
        randomizeTests: (value: unknown) => void;
        randomTests: () => boolean;
        seed: (value: unknown) => unknown;
        execute: (runnablesToRun?: Array<string>, suiteTree?: Suite) => Promise<void>;
        fdescribe: (
        description: Circus.TestNameLike,
        specDefinitions: SpecDefinitionsFn
        ) => Suite;
        spyOn: (
        obj: Record<string, Spy>,
        methodName: string,
        accessType?: keyof PropertyDescriptor
        ) => Spy;
        beforeEach: (beforeEachFunction: QueueableFn['fn'], timeout?: number) => void;
        afterEach: (afterEachFunction: QueueableFn['fn'], timeout?: number) => void;
        clearReporters: () => void;
        addReporter: (reporterToAdd: Reporter) => void;
        it: (
        description: Circus.TestNameLike,
        fn: QueueableFn['fn'],
        timeout?: number
        ) => Spec;
        xdescribe: (
        description: Circus.TestNameLike,
        specDefinitions: SpecDefinitionsFn
        ) => Suite;
        xit: (
        description: Circus.TestNameLike,
        fn: QueueableFn['fn'],
        timeout?: number
        ) => Spec;
        beforeAll: (beforeAllFunction: QueueableFn['fn'], timeout?: number) => void;
        todo: () => Spec;
        provideFallbackReporter: (reporterToAdd: Reporter) => void;
        allowRespy: (allow: boolean) => void;
        describe: (
        description: Circus.TestNameLike,
        specDefinitions: SpecDefinitionsFn
        ) => Suite;
        };

          function queueRunner

          queueRunner: (
          options: Options_2
          ) => PromiseLike<void> & {
          cancel: () => void;
          catch: (onRejected?: PromiseCallback) => Promise<void>;
          };

            Type Aliases

            type Jasmine

            type Jasmine = {
            _DEFAULT_TIMEOUT_INTERVAL: number;
            DEFAULT_TIMEOUT_INTERVAL: number;
            currentEnv_: ReturnType<typeof jasmineEnv>['prototype'];
            getEnv: () => ReturnType<typeof jasmineEnv>['prototype'];
            createSpy: typeof createSpy;
            Env: ReturnType<typeof jasmineEnv>;
            JsApiReporter: typeof JsApiReporter;
            ReportDispatcher: typeof ReportDispatcher;
            Spec: typeof Spec;
            SpyRegistry: typeof SpyRegistry;
            Suite: typeof Suite;
            Timer: typeof Timer;
            version: string;
            testPath: string;
            addMatchers: (matchers: JasmineMatchersObject) => void;
            } & AsymmetricMatchers & {
            process: NodeJS.Process;
            };

              Package Files (1)

              Dependencies (17)

              Dev Dependencies (1)

              Peer Dependencies (0)

              No peer dependencies.

              Badge

              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-jasmine2.

              • Markdown
                [![jsDocs.io](https://img.shields.io/badge/jsDocs.io-reference-blue)](https://www.jsdocs.io/package/jest-jasmine2)
              • HTML
                <a href="https://www.jsdocs.io/package/jest-jasmine2"><img src="https://img.shields.io/badge/jsDocs.io-reference-blue" alt="jsDocs.io"></a>