UNPKG

jest-jasmine2

Version:
2,401 lines 77.1 kB
/*!
 * /**
 *  * Copyright (c) Meta Platforms, Inc. and affiliates.
 *  *
 *  * This source code is licensed under the MIT license found in the
 *  * LICENSE file in the root directory of this source tree.
 *  * /
 */
/******/ (() => { // webpackBootstrap
/******/ 	"use strict";
/******/ 	var __webpack_modules__ = ({

/***/ "./src/ExpectationFailed.ts"
(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
/**
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

class ExpectationFailed extends Error {}
exports["default"] = ExpectationFailed;

/***/ },

/***/ "./src/PCancelable.ts"
(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var Symbol = globalThis['jest-symbol-do-not-touch'] || globalThis.Symbol;
var Symbol = globalThis['jest-symbol-do-not-touch'] || globalThis.Symbol;
var Promise = globalThis[Symbol.for('jest-native-promise')] || globalThis.Promise;
/**
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

class CancelError extends Error {
  constructor() {
    super('Promise was canceled');
    this.name = 'CancelError';
  }
}
class PCancelable {
  _pending = true;
  _canceled = false;
  _promise;
  _cancel;
  // eslint-disable-next-line @typescript-eslint/no-empty-function
  _reject = () => {};
  constructor(executor) {
    this._promise = new Promise((resolve, reject) => {
      this._reject = reject;
      return executor(fn => {
        this._cancel = fn;
      }, val => {
        this._pending = false;
        resolve(val);
      }, err => {
        this._pending = false;
        reject(err);
      });
    });
  }

  // eslint-disable-next-line unicorn/no-thenable
  then(onFulfilled, onRejected) {
    return this._promise.then(onFulfilled, onRejected);
  }
  catch(onRejected) {
    return this._promise.catch(onRejected);
  }
  cancel() {
    if (!this._pending || this._canceled) {
      return;
    }
    if (typeof this._cancel === 'function') {
      try {
        this._cancel();
      } catch (error) {
        this._reject(error);
      }
    }
    this._canceled = true;
    this._reject(new CancelError());
  }
}
exports["default"] = PCancelable;

/***/ },

/***/ "./src/assertionErrorMessage.ts"
(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _chalk = _interopRequireDefault(require("chalk"));
var _jestMatcherUtils = require("jest-matcher-utils");
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
/**
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

const assertOperatorsMap = {
  '!=': 'notEqual',
  '!==': 'notStrictEqual',
  '==': 'equal',
  '===': 'strictEqual'
};
const humanReadableOperators = {
  deepEqual: 'to deeply equal',
  deepStrictEqual: 'to deeply and strictly equal',
  equal: 'to be equal',
  notDeepEqual: 'not to deeply equal',
  notDeepStrictEqual: 'not to deeply and strictly equal',
  notEqual: 'to not be equal',
  notStrictEqual: 'not be strictly equal',
  strictEqual: 'to strictly be equal'
};
const getOperatorName = (operator, stack) => {
  if (typeof operator === 'string') {
    return assertOperatorsMap[operator] || operator;
  }
  if (stack.match('.doesNotThrow')) {
    return 'doesNotThrow';
  }
  if (stack.match('.throws')) {
    return 'throws';
  }
  return '';
};
const operatorMessage = operator => {
  const niceOperatorName = getOperatorName(operator, '');
  const humanReadableOperator = humanReadableOperators[niceOperatorName];
  return typeof operator === 'string' ? `${humanReadableOperator || niceOperatorName} to:\n` : '';
};
const assertThrowingMatcherHint = operatorName => operatorName ? _chalk.default.dim('assert') + _chalk.default.dim(`.${operatorName}(`) + _chalk.default.red('function') + _chalk.default.dim(')') : '';
const assertMatcherHint = (operator, operatorName, expected) => {
  let message = '';
  if (operator === '==' && expected === true) {
    message = _chalk.default.dim('assert') + _chalk.default.dim('(') + _chalk.default.red('received') + _chalk.default.dim(')');
  } else if (operatorName) {
    message = _chalk.default.dim('assert') + _chalk.default.dim(`.${operatorName}(`) + _chalk.default.red('received') + _chalk.default.dim(', ') + _chalk.default.green('expected') + _chalk.default.dim(')');
  }
  return message;
};
function assertionErrorMessage(error, options) {
  const {
    expected,
    actual,
    generatedMessage,
    message,
    operator,
    stack
  } = error;
  const diffString = (0, _jestMatcherUtils.diff)(expected, actual, options);
  const hasCustomMessage = !generatedMessage;
  const operatorName = getOperatorName(operator, stack);
  const trimmedStack = stack.replace(message, '').replaceAll(/AssertionError(.*)/g, '');
  if (operatorName === 'doesNotThrow') {
    return `${buildHintString(assertThrowingMatcherHint(operatorName)) + _chalk.default.reset('Expected the function not to throw an error.\n') + _chalk.default.reset('Instead, it threw:\n')}  ${(0, _jestMatcherUtils.printReceived)(actual)}${_chalk.default.reset(hasCustomMessage ? `\n\nMessage:\n  ${message}` : '')}${trimmedStack}`;
  }
  if (operatorName === 'throws') {
    if (error.generatedMessage) {
      return buildHintString(assertThrowingMatcherHint(operatorName)) + _chalk.default.reset(error.message) + _chalk.default.reset(hasCustomMessage ? `\n\nMessage:\n  ${message}` : '') + trimmedStack;
    }
    return buildHintString(assertThrowingMatcherHint(operatorName)) + _chalk.default.reset('Expected the function to throw an error.\n') + _chalk.default.reset("But it didn't throw anything.") + _chalk.default.reset(hasCustomMessage ? `\n\nMessage:\n  ${message}` : '') + trimmedStack;
  }
  if (operatorName === 'fail') {
    return buildHintString(assertMatcherHint(operator, operatorName, expected)) + _chalk.default.reset(hasCustomMessage ? `Message:\n  ${message}` : '') + trimmedStack;
  }
  return `${buildHintString(assertMatcherHint(operator, operatorName, expected)) + _chalk.default.reset(`Expected value ${operatorMessage(operator)}`)}  ${(0, _jestMatcherUtils.printExpected)(expected)}\n${_chalk.default.reset('Received:\n')}  ${(0, _jestMatcherUtils.printReceived)(actual)}${_chalk.default.reset(hasCustomMessage ? `\n\nMessage:\n  ${message}` : '')}${diffString ? `\n\nDifference:\n\n${diffString}` : ''}${trimmedStack}`;
}
function buildHintString(hint) {
  return hint ? `${hint}\n\n` : '';
}
var _default = exports["default"] = assertionErrorMessage;

/***/ },

/***/ "./src/expectationResultFactory.ts"
(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = expectationResultFactory;
var _prettyFormat = require("pretty-format");
/**
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

function messageFormatter({
  error,
  message,
  passed
}) {
  if (passed) {
    return 'Passed.';
  }
  if (message) {
    return message;
  }
  if (typeof error === 'string') {
    return error;
  }
  if (
  // duck-type Error, see #2549
  error && typeof error === 'object' && typeof error.message === 'string' && typeof error.name === 'string') {
    if (error.message === '') {
      return error.name;
    }
    return `${error.name}: ${error.message}`;
  }
  return `thrown: ${(0, _prettyFormat.format)(error, {
    maxDepth: 3
  })}`;
}
function stackFormatter(options, initError, errorMessage) {
  if (options.passed) {
    return '';
  }
  if (options.error) {
    if (typeof options.error.stack === 'string') {
      return options.error.stack;
    }
    if (options.error === errorMessage) {
      return errorMessage;
    }
  }
  if (initError) {
    return `${errorMessage.trimEnd()}\n\n${initError.stack}`;
  }
  return new Error(errorMessage).stack;
}
function expectationResultFactory(options, initError) {
  const message = messageFormatter(options);
  const stack = stackFormatter(options, initError, message);
  if (options.passed) {
    return {
      error: options.error,
      matcherName: options.matcherName,
      message,
      passed: options.passed,
      stack
    };
  }
  return {
    actual: options.actual,
    error: options.error,
    expected: options.expected,
    matcherName: options.matcherName,
    message,
    passed: options.passed,
    stack
  };
}

/***/ },

/***/ "./src/isError.ts"
(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = isError;
var _prettyFormat = require("pretty-format");
/**
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

function isError(
// eslint-disable-next-line @typescript-eslint/explicit-module-boundary-types
potentialError) {
  // duck-type Error, see #2549
  const isError = potentialError !== null && typeof potentialError === 'object' && typeof potentialError.message === 'string' && typeof potentialError.name === 'string';
  const message = isError ? null : `Failed: ${(0, _prettyFormat.format)(potentialError, {
    maxDepth: 3
  })}`;
  return {
    isError,
    message
  };
}

/***/ },

/***/ "./src/jasmine/CallTracker.ts"
(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
/**
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 */
// This file is a heavily modified fork of Jasmine. Original license:
/*
Copyright (c) 2008-2016 Pivotal Labs

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

class CallTracker {
  track;
  any;
  count;
  argsFor;
  all;
  allArgs;
  first;
  mostRecent;
  reset;
  constructor() {
    let calls = [];
    this.track = function (context) {
      calls.push(context);
    };
    this.any = function () {
      return calls.length > 0;
    };
    this.count = function () {
      return calls.length;
    };
    this.argsFor = function (index) {
      const call = calls[index];
      return call ? call.args : [];
    };
    this.all = function () {
      return calls;
    };
    this.allArgs = function () {
      const callArgs = [];
      for (const call of calls) {
        callArgs.push(call.args);
      }
      return callArgs;
    };
    this.first = function () {
      return calls[0];
    };
    this.mostRecent = function () {
      return calls.at(-1);
    };
    this.reset = function () {
      calls = [];
    };
  }
}
var _default = exports["default"] = CallTracker;

/***/ },

/***/ "./src/jasmine/Env.ts"
(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = jasmineEnv;
var _nodeAssert = require("node:assert");
var _jestUtil = require("jest-util");
var _assertionErrorMessage = _interopRequireDefault(__webpack_require__("./src/assertionErrorMessage.ts"));
var _isError = _interopRequireDefault(__webpack_require__("./src/isError.ts"));
var _queueRunner = _interopRequireDefault(__webpack_require__("./src/queueRunner.ts"));
var _treeProcessor = _interopRequireDefault(__webpack_require__("./src/treeProcessor.ts"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
/**
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 */
// This file is a heavily modified fork of Jasmine. Original license:
/*
Copyright (c) 2008-2016 Pivotal Labs

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/* eslint-disable sort-keys */

function isAssertionError(error) {
  return error instanceof _nodeAssert.AssertionError || error?.name === _nodeAssert.AssertionError.name;
}
function jasmineEnv(j$) {
  return class Env {
    specFilter;
    catchExceptions;
    throwOnExpectationFailure;
    catchingExceptions;
    topSuite;
    focusedRunnableIds;
    fail;
    pending;
    afterAll;
    fit;
    throwingExpectationFailures;
    randomizeTests;
    randomTests;
    seed;
    execute;
    fdescribe;
    spyOn;
    beforeEach;
    afterEach;
    clearReporters;
    addReporter;
    it;
    xdescribe;
    xit;
    beforeAll;
    todo;
    provideFallbackReporter;
    allowRespy;
    describe;
    constructor() {
      let totalSpecsDefined = 0;
      let catchExceptions = true;
      const realSetTimeout = globalThis.setTimeout;
      const realClearTimeout = globalThis.clearTimeout;
      const runnableResources = {};
      const currentlyExecutingSuites = [];
      let currentSpec = null;
      let throwOnExpectationFailure = false;
      let random = false;
      let seed = null;
      let nextSpecId = 0;
      let nextSuiteId = 0;
      const getNextSpecId = function () {
        return `spec${nextSpecId++}`;
      };
      const getNextSuiteId = function () {
        return `suite${nextSuiteId++}`;
      };
      const topSuite = new j$.Suite({
        id: getNextSuiteId(),
        description: '',
        getTestPath() {
          return j$.testPath;
        }
      });
      let currentDeclarationSuite = topSuite;
      const currentSuite = function () {
        return currentlyExecutingSuites.at(-1);
      };
      const currentRunnable = function () {
        return currentSpec || currentSuite();
      };
      const reporter = new j$.ReportDispatcher(['jasmineStarted', 'jasmineDone', 'suiteStarted', 'suiteDone', 'specStarted', 'specDone']);
      this.specFilter = function () {
        return true;
      };
      const defaultResourcesForRunnable = function (id, _parentRunnableId) {
        const resources = {
          spies: []
        };
        runnableResources[id] = resources;
      };
      const clearResourcesForRunnable = function (id) {
        spyRegistry.clearSpies();
        delete runnableResources[id];
      };
      const beforeAndAfterFns = function (suite) {
        return function () {
          let afters = [];
          let befores = [];
          while (suite) {
            befores = befores.concat(suite.beforeFns);
            afters = afters.concat(suite.afterFns);
            suite = suite.parentSuite;
          }
          return {
            befores: befores.reverse(),
            afters
          };
        };
      };
      const getSpecName = function (spec, suite) {
        const fullName = [spec.description];
        const suiteFullName = suite.getFullName();
        if (suiteFullName !== '') {
          fullName.unshift(suiteFullName);
        }
        return fullName.join(' ');
      };
      this.catchExceptions = function (value) {
        catchExceptions = !!value;
        return catchExceptions;
      };
      this.catchingExceptions = function () {
        return catchExceptions;
      };
      this.throwOnExpectationFailure = function (value) {
        throwOnExpectationFailure = !!value;
      };
      this.throwingExpectationFailures = function () {
        return throwOnExpectationFailure;
      };
      this.randomizeTests = function (value) {
        random = !!value;
      };
      this.randomTests = function () {
        return random;
      };
      this.seed = function (value) {
        if (value) {
          seed = value;
        }
        return seed;
      };
      const queueRunnerFactory = options => {
        options.clearTimeout = realClearTimeout;
        options.fail = this.fail;
        options.setTimeout = realSetTimeout;
        return (0, _queueRunner.default)(options);
      };
      this.topSuite = function () {
        return topSuite;
      };
      const uncaught = err => {
        if (currentSpec) {
          currentSpec.onException(err);
          currentSpec.cancel();
        } else {
          console.error('Unhandled error');
          console.error(err.stack);
        }
      };
      let oldListenersException;
      let oldListenersRejection;
      const executionSetup = function () {
        // Need to ensure we are the only ones handling these exceptions.
        oldListenersException = [...process.listeners('uncaughtException')];
        oldListenersRejection = [...process.listeners('unhandledRejection')];
        j$.process.removeAllListeners('uncaughtException');
        j$.process.removeAllListeners('unhandledRejection');
        j$.process.on('uncaughtException', uncaught);
        j$.process.on('unhandledRejection', uncaught);
      };
      const executionTeardown = function () {
        j$.process.removeListener('uncaughtException', uncaught);
        j$.process.removeListener('unhandledRejection', uncaught);

        // restore previous exception handlers
        for (const listener of oldListenersException) {
          j$.process.on('uncaughtException', listener);
        }
        for (const listener of oldListenersRejection) {
          j$.process.on('unhandledRejection', listener);
        }
      };
      this.execute = async function (runnablesToRun, suiteTree = topSuite) {
        if (!runnablesToRun) {
          if (focusedRunnables.length > 0) {
            runnablesToRun = focusedRunnables;
          } else {
            runnablesToRun = [suiteTree.id];
          }
        }
        if (currentlyExecutingSuites.length === 0) {
          executionSetup();
        }
        const lastDeclarationSuite = currentDeclarationSuite;
        await (0, _treeProcessor.default)({
          nodeComplete(suite) {
            if (!suite.disabled) {
              clearResourcesForRunnable(suite.id);
            }
            currentlyExecutingSuites.pop();
            if (suite === topSuite) {
              reporter.jasmineDone({
                failedExpectations: topSuite.result.failedExpectations
              });
            } else {
              reporter.suiteDone(suite.getResult());
            }
          },
          nodeStart(suite) {
            currentlyExecutingSuites.push(suite);
            defaultResourcesForRunnable(suite.id, suite.parentSuite && suite.parentSuite.id);
            if (suite === topSuite) {
              reporter.jasmineStarted({
                totalSpecsDefined
              });
            } else {
              reporter.suiteStarted(suite.result);
            }
          },
          queueRunnerFactory,
          runnableIds: runnablesToRun,
          tree: suiteTree
        });
        currentDeclarationSuite = lastDeclarationSuite;
        if (currentlyExecutingSuites.length === 0) {
          executionTeardown();
        }
      };
      this.addReporter = function (reporterToAdd) {
        reporter.addReporter(reporterToAdd);
      };
      this.provideFallbackReporter = function (reporterToAdd) {
        reporter.provideFallbackReporter(reporterToAdd);
      };
      this.clearReporters = function () {
        reporter.clearReporters();
      };
      const spyRegistry = new j$.SpyRegistry({
        currentSpies() {
          if (!currentRunnable()) {
            throw new Error('Spies must be created in a before function or a spec');
          }
          return runnableResources[currentRunnable().id].spies;
        }
      });
      this.allowRespy = function (allow) {
        spyRegistry.allowRespy(allow);
      };
      this.spyOn = function (...args) {
        return spyRegistry.spyOn.apply(spyRegistry, args);
      };
      const suiteFactory = function (description) {
        const suite = new j$.Suite({
          id: getNextSuiteId(),
          description,
          parentSuite: currentDeclarationSuite,
          throwOnExpectationFailure,
          getTestPath() {
            return j$.testPath;
          }
        });
        return suite;
      };
      this.describe = function (description, specDefinitions) {
        const suite = suiteFactory(description);
        if (specDefinitions === undefined) {
          throw new Error('Missing second argument. It must be a callback function.');
        }
        if (typeof specDefinitions !== 'function') {
          throw new TypeError(`Invalid second argument, ${specDefinitions}. It must be a callback function.`);
        }
        if (specDefinitions.length > 0) {
          throw new Error('describe does not expect any arguments');
        }
        if (currentDeclarationSuite.markedPending) {
          suite.pend();
        }
        if (currentDeclarationSuite.markedTodo) {
          // @ts-expect-error TODO Possible error: Suite does not have todo method
          suite.todo();
        }
        addSpecsToSuite(suite, specDefinitions);
        return suite;
      };
      this.xdescribe = function (description, specDefinitions) {
        const suite = suiteFactory(description);
        suite.pend();
        addSpecsToSuite(suite, specDefinitions);
        return suite;
      };
      const focusedRunnables = [];

      // Ids of the runnables (`fit`/`fdescribe`) that focus execution. When
      // non-empty, an actual run only executes these subtrees and reports the
      // rest as pending. `--collectTests` reads this to mirror that selection.
      this.focusedRunnableIds = function () {
        return [...focusedRunnables];
      };
      this.fdescribe = function (description, specDefinitions) {
        const suite = suiteFactory(description);
        suite.isFocused = true;
        focusedRunnables.push(suite.id);
        unfocusAncestor();
        addSpecsToSuite(suite, specDefinitions);
        return suite;
      };
      const addSpecsToSuite = (suite, specDefinitions) => {
        const parentSuite = currentDeclarationSuite;
        parentSuite.addChild(suite);
        currentDeclarationSuite = suite;
        let declarationError = undefined;
        let describeReturnValue;
        try {
          describeReturnValue = specDefinitions.call(suite);
        } catch (error) {
          declarationError = error;
        }
        if ((0, _jestUtil.isPromise)(describeReturnValue)) {
          declarationError = new Error('Returning a Promise from "describe" is not supported. Tests must be defined synchronously.');
        } else if (describeReturnValue !== undefined) {
          declarationError = new Error('A "describe" callback must not return a value.');
        }
        if (declarationError) {
          this.it('encountered a declaration exception', () => {
            throw declarationError;
          });
        }
        currentDeclarationSuite = parentSuite;
      };
      function findFocusedAncestor(suite) {
        while (suite) {
          if (suite.isFocused) {
            return suite.id;
          }
          suite = suite.parentSuite;
        }
        return null;
      }
      function unfocusAncestor() {
        const focusedAncestor = findFocusedAncestor(currentDeclarationSuite);
        if (focusedAncestor) {
          for (let i = 0; i < focusedRunnables.length; i++) {
            if (focusedRunnables[i] === focusedAncestor) {
              focusedRunnables.splice(i, 1);
              break;
            }
          }
        }
      }
      const specFactory = (description, fn, suite, timeout) => {
        totalSpecsDefined++;
        const spec = new j$.Spec({
          id: getNextSpecId(),
          beforeAndAfterFns: beforeAndAfterFns(suite),
          resultCallback: specResultCallback,
          getSpecName(spec) {
            return getSpecName(spec, suite);
          },
          getTestPath() {
            return j$.testPath;
          },
          onStart: specStarted,
          description,
          queueRunnerFactory,
          userContext() {
            return suite.clonedSharedUserContext();
          },
          queueableFn: {
            fn,
            timeout() {
              return timeout || j$._DEFAULT_TIMEOUT_INTERVAL;
            }
          },
          throwOnExpectationFailure
        });
        if (!this.specFilter(spec)) {
          spec.disable();
        }
        return spec;
        function specResultCallback(result) {
          clearResourcesForRunnable(spec.id);
          currentSpec = null;
          reporter.specDone(result);
        }
        function specStarted(spec) {
          currentSpec = spec;
          defaultResourcesForRunnable(spec.id, suite.id);
          reporter.specStarted(spec.result);
        }
      };
      this.it = function (description, fn, timeout) {
        description = (0, _jestUtil.convertDescriptorToString)(description);
        if (fn === undefined) {
          throw new Error('Missing second argument. It must be a callback function. Perhaps you want to use `test.todo` for a test placeholder.');
        }
        if (typeof fn !== 'function') {
          throw new TypeError(`Invalid second argument, ${fn}. It must be a callback function.`);
        }
        const spec = specFactory(description, fn, currentDeclarationSuite, timeout);
        if (currentDeclarationSuite.markedPending) {
          spec.pend();
        }

        // When a test is defined inside another, jasmine will not run it.
        // This check throws an error to warn the user about the edge-case.
        if (currentSpec !== null) {
          throw new Error(`Tests cannot be nested. Test "${spec.description}" cannot run because it is nested within "${currentSpec.description}".`);
        }
        currentDeclarationSuite.addChild(spec);
        return spec;
      };
      this.xit = function (...args) {
        const spec = this.it.apply(this, args);
        spec.pend('Temporarily disabled with xit');
        return spec;
      };
      this.todo = function () {
        const description = arguments[0];
        if (arguments.length !== 1 || typeof description !== 'string') {
          throw new _jestUtil.ErrorWithStack('Todo must be called with only a description.', this.todo);
        }
        const spec = specFactory(description,
        // eslint-disable-next-line @typescript-eslint/no-empty-function
        () => {}, currentDeclarationSuite);
        if (currentDeclarationSuite.markedPending) {
          spec.pend();
        } else {
          spec.todo();
        }
        currentDeclarationSuite.addChild(spec);
        return spec;
      };
      this.fit = function (description, fn, timeout) {
        const spec = specFactory(description, fn, currentDeclarationSuite, timeout);
        currentDeclarationSuite.addChild(spec);
        if (currentDeclarationSuite.markedPending) {
          spec.pend();
        } else {
          focusedRunnables.push(spec.id);
        }
        unfocusAncestor();
        return spec;
      };
      this.beforeEach = function (beforeEachFunction, timeout) {
        currentDeclarationSuite.beforeEach({
          fn: beforeEachFunction,
          timeout() {
            return timeout || j$._DEFAULT_TIMEOUT_INTERVAL;
          }
        });
      };
      this.beforeAll = function (beforeAllFunction, timeout) {
        currentDeclarationSuite.beforeAll({
          fn: beforeAllFunction,
          timeout() {
            return timeout || j$._DEFAULT_TIMEOUT_INTERVAL;
          }
        });
      };
      this.afterEach = function (afterEachFunction, timeout) {
        currentDeclarationSuite.afterEach({
          fn: afterEachFunction,
          timeout() {
            return timeout || j$._DEFAULT_TIMEOUT_INTERVAL;
          }
        });
      };
      this.afterAll = function (afterAllFunction, timeout) {
        currentDeclarationSuite.afterAll({
          fn: afterAllFunction,
          timeout() {
            return timeout || j$._DEFAULT_TIMEOUT_INTERVAL;
          }
        });
      };
      this.pending = function (message) {
        let fullMessage = j$.Spec.pendingSpecExceptionMessage;
        if (message) {
          fullMessage += message;
        }
        throw fullMessage;
      };
      this.fail = function (error) {
        let checkIsError;
        let message;
        if (isAssertionError(error)) {
          checkIsError = false;
          message = (0, _assertionErrorMessage.default)(error, {
            expand: j$.Spec.expand
          });
        } else {
          const check = (0, _isError.default)(error);
          checkIsError = check.isError;
          message = check.message || undefined;
        }
        const errorAsErrorObject = checkIsError ? error : new Error(message);
        const runnable = currentRunnable();
        if (!runnable) {
          errorAsErrorObject.message = `Caught error after test environment was torn down\n\n${errorAsErrorObject.message}`;
          throw errorAsErrorObject;
        }
        runnable.addExpectationResult(false, {
          matcherName: '',
          passed: false,
          expected: '',
          actual: '',
          message,
          error: errorAsErrorObject
        });
      };
    }
  };
}

/***/ },

/***/ "./src/jasmine/JsApiReporter.ts"
(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
/**
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 */
// This file is a heavily modified fork of Jasmine. Original license:
/*
Copyright (c) 2008-2016 Pivotal Labs

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/* eslint-disable sort-keys, @typescript-eslint/no-empty-function */

const noopTimer = {
  start() {},
  elapsed() {
    return 0;
  }
};
class JsApiReporter {
  started;
  finished;
  runDetails;
  jasmineStarted;
  jasmineDone;
  status;
  executionTime;
  suiteStarted;
  suiteDone;
  suiteResults;
  suites;
  specResults;
  specDone;
  specs;
  specStarted;
  constructor(options) {
    const timer = options.timer || noopTimer;
    let status = 'loaded';
    this.started = false;
    this.finished = false;
    this.runDetails = {};
    this.jasmineStarted = () => {
      this.started = true;
      status = 'started';
      timer.start();
    };
    let executionTime;
    function validateAfterAllExceptions({
      failedExpectations
    }) {
      if (failedExpectations && failedExpectations.length > 0) {
        throw failedExpectations[0];
      }
    }
    this.jasmineDone = function (runDetails) {
      validateAfterAllExceptions(runDetails);
      this.finished = true;
      this.runDetails = runDetails;
      executionTime = timer.elapsed();
      status = 'done';
    };
    this.status = function () {
      return status;
    };
    const suites = [];
    const suites_hash = {};
    this.specStarted = function () {};
    this.suiteStarted = function (result) {
      suites_hash[result.id] = result;
    };
    this.suiteDone = function (result) {
      storeSuite(result);
    };
    this.suiteResults = function (index, length) {
      return suites.slice(index, index + length);
    };
    function storeSuite(result) {
      suites.push(result);
      suites_hash[result.id] = result;
    }
    this.suites = function () {
      return suites_hash;
    };
    const specs = [];
    this.specDone = function (result) {
      specs.push(result);
    };
    this.specResults = function (index, length) {
      return specs.slice(index, index + length);
    };
    this.specs = function () {
      return specs;
    };
    this.executionTime = function () {
      return executionTime;
    };
  }
}
exports["default"] = JsApiReporter;

/***/ },

/***/ "./src/jasmine/ReportDispatcher.ts"
(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
/**
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 */
// This file is a heavily modified fork of Jasmine. Original license:
/*
Copyright (c) 2008-2016 Pivotal Labs

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

class ReportDispatcher {
  addReporter;
  provideFallbackReporter;
  clearReporters;

  // @ts-expect-error: confused by loop in ctor
  jasmineDone;
  // @ts-expect-error: confused by loop in ctor
  jasmineStarted;
  // @ts-expect-error: confused by loop in ctor
  specDone;
  // @ts-expect-error: confused by loop in ctor
  specStarted;
  // @ts-expect-error: confused by loop in ctor
  suiteDone;
  // @ts-expect-error: confused by loop in ctor
  suiteStarted;
  constructor(methods) {
    const dispatchedMethods = methods || [];
    for (const method of dispatchedMethods) {
      this[method] = function (m) {
        return function () {
          dispatch(m, arguments);
        };
      }(method);
    }
    let reporters = [];
    let fallbackReporter = null;
    this.addReporter = function (reporter) {
      reporters.push(reporter);
    };
    this.provideFallbackReporter = function (reporter) {
      fallbackReporter = reporter;
    };
    this.clearReporters = function () {
      reporters = [];
    };
    return this;
    function dispatch(method, args) {
      if (reporters.length === 0 && fallbackReporter !== null) {
        reporters.push(fallbackReporter);
      }
      for (const reporter of reporters) {
        if (reporter[method]) {
          // @ts-expect-error: wrong context
          reporter[method].apply(reporter, args);
        }
      }
    }
  }
}
exports["default"] = ReportDispatcher;

/***/ },

/***/ "./src/jasmine/Spec.ts"
(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _nodeAssert = require("node:assert");
var _jestUtil = require("jest-util");
var _ExpectationFailed = _interopRequireDefault(__webpack_require__("./src/ExpectationFailed.ts"));
var _assertionErrorMessage = _interopRequireDefault(__webpack_require__("./src/assertionErrorMessage.ts"));
var _expectationResultFactory = _interopRequireDefault(__webpack_require__("./src/expectationResultFactory.ts"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
/**
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 */
// This file is a heavily modified fork of Jasmine. Original license:
/*
Copyright (c) 2008-2016 Pivotal Labs

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/* eslint-disable sort-keys, @typescript-eslint/no-empty-function */

class Spec {
  id;
  description;
  resultCallback;
  queueableFn;
  beforeAndAfterFns;
  userContext;
  onStart;
  getSpecName;
  queueRunnerFactory;
  throwOnExpectationFailure;
  initError;
  result;
  disabled;
  currentRun;
  markedTodo;
  markedPending;
  static expand;
  static pendingSpecExceptionMessage;
  static isPendingSpecException(e) {
    return !!(e && e.toString && e.toString().includes(Spec.pendingSpecExceptionMessage));
  }
  constructor(attrs) {
    this.resultCallback = attrs.resultCallback || function () {};
    this.id = attrs.id;
    this.description = (0, _jestUtil.convertDescriptorToString)(attrs.description);
    this.queueableFn = attrs.queueableFn;
    this.beforeAndAfterFns = attrs.beforeAndAfterFns || function () {
      return {
        befores: [],
        afters: []
      };
    };
    this.userContext = attrs.userContext || function () {
      return {};
    };
    this.onStart = attrs.onStart || function () {};
    this.getSpecName = attrs.getSpecName || function () {
      return '';
    };
    this.queueRunnerFactory = attrs.queueRunnerFactory || function () {};
    this.throwOnExpectationFailure = !!attrs.throwOnExpectationFailure;

    // eslint-disable-next-line unicorn/error-message
    this.initError = new Error();
    this.initError.name = '';

    // Without this line v8 stores references to all closures
    // in the stack in the Error object. This line stringifies the stack
    // property to allow garbage-collecting objects on the stack
    // https://crbug.com/v8/7142
    // eslint-disable-next-line no-self-assign
    this.initError.stack = this.initError.stack;
    this.queueableFn.initError = this.initError;

    // @ts-expect-error: misses some fields added later
    this.result = {
      id: this.id,
      description: this.description,
      fullName: this.getFullName(),
      failedExpectations: [],
      passedExpectations: [],
      pendingReason: '',
      testPath: attrs.getTestPath()
    };
  }
  addExpectationResult(passed, data, isError) {
    const expectationResult = (0, _expectationResultFactory.default)(data, this.initError);
    if (passed) {
      this.result.passedExpectations.push(expectationResult);
    } else {
      this.result.failedExpectations.push(expectationResult);
      if (this.throwOnExpectationFailure && !isError) {
        throw new _ExpectationFailed.default();
      }
    }
  }
  execute(onComplete, enabled) {
    // eslint-disable-next-line @typescript-eslint/no-this-alias
    const self = this;
    this.onStart(this);
    if (!this.isExecutable() || this.markedPending || this.markedTodo || enabled === false) {
      complete(enabled);
      return;
    }
    const fns = this.beforeAndAfterFns();
    const allFns = fns.befores.concat(this.queueableFn).concat(fns.afters);
    this.currentRun = this.queueRunnerFactory({
      queueableFns: allFns,
      onException() {
        // @ts-expect-error: wrong context
        self.onException.apply(self, arguments);
      },
      userContext: this.userContext(),
      setTimeout,
      clearTimeout,
      fail: () => {}
    });
    this.currentRun.then(() => complete(true));
    function complete(enabledAgain) {
      self.result.status = self.status(enabledAgain);
      self.resultCallback(self.result);
      if (onComplete) {
        onComplete();
      }
    }
  }
  cancel() {
    if (this.currentRun) {
      this.currentRun.cancel();
    }
  }
  onException(error) {
    if (Spec.isPendingSpecException(error)) {
      this.pend(extractCustomPendingMessage(error));
      return;
    }
    if (error instanceof _ExpectationFailed.default) {
      return;
    }
    this.addExpectationResult(false, {
      matcherName: '',
      passed: false,
      expected: '',
      actual: '',
      error: this.isAssertionError(error) ? (0, _assertionErrorMessage.default)(error, {
        expand: Spec.expand
      }) : error
    }, true);
  }
  disable() {
    this.disabled = true;
  }
  pend(message) {
    this.markedPending = true;
    if (message) {
      this.result.pendingReason = message;
    }
  }
  todo() {
    this.markedTodo = true;
  }
  getResult() {
    this.result.status = this.status();
    return this.result;
  }
  status(enabled) {
    if (this.disabled || enabled === false) {
      return 'disabled';
    }
    if (this.markedTodo) {
      return 'todo';
    }
    if (this.markedPending) {
      return 'pending';
    }
    if (this.result.failedExpectations.length > 0) {
      return 'failed';
    } else {
      return 'passed';
    }
  }
  isExecutable() {
    return !this.disabled;
  }
  getFullName() {
    return this.getSpecName(this);
  }
  isAssertionError(error) {
    return error instanceof _nodeAssert.AssertionError || error && error.name === _nodeAssert.AssertionError.name;
  }
}
exports["default"] = Spec;
Spec.pendingSpecExceptionMessage = '=> marked Pending';
const extractCustomPendingMessage = function (e) {
  const fullMessage = e.toString();
  const boilerplateStart = fullMessage.indexOf(Spec.pendingSpecExceptionMessage);
  const boilerplateEnd = boilerplateStart + Spec.pendingSpecExceptionMessage.length;
  return fullMessage.slice(boilerplateEnd);
};

/***/ },

/***/ "./src/jasmine/SpyStrategy.ts"
(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
/**
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 */
// This file is a heavily modified fork of Jasmine. Original license:
/*
Copyright (c) 2008-2016 Pivotal Labs

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

/* eslint-disable @typescript-eslint/no-empty-function */

class SpyStrategy {
  identity;
  exec;
  callThrough;
  returnValue;
  returnValues;
  throwError;
  callFake;
  stub;
  constructor({
    name = 'unknown',
    fn = function () {},
    getSpy = function () {}
  } = {}) {
    const identity = name;
    const originalFn = fn;
    let plan = function () {};
    this.identity = function () {
      return identity;
    };
    this.exec = function () {
      return plan.apply(this, arguments);
    };
    this.callThrough = function () {
      plan = originalFn;
      return getSpy();
    };
    this.returnValue = function (value) {
      plan = function () {
        return value;
      };
      return getSpy();
    };
    this.returnValues = function () {
      const values = Array.prototype.slice.call(arguments);
      plan = function () {
        return values.shift();
      };
      return getSpy();
    };
    this.throwError = function (something) {
      const error = something instanceof Error ? something : new Error(something);
      plan = function () {
        throw error;
      };
      return getSpy();
    };
    this.callFake = function (fn) {
      if (typeof fn !== 'function') {
        throw new TypeError(`Argument passed to callFake should be a function, got ${fn}`);
      }
      plan = fn;
      return getSpy();
    };
    this.stub = function (_fn) {
      plan = function () {};
      return getSpy();
    };
  }
}
exports["default"] = SpyStrategy;

/***/ },

/***/ "./src/jasmine/Suite.ts"
(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _jestUtil = require("jest-util");
var _ExpectationFailed = _interopRequireDefault(__webpack_require__("./src/ExpectationFailed.ts"));
var _expectationResultFactory = _interopRequireDefault(__webpack_require__("./src/expectationResultFactory.ts"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
/**
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 */
// This file is a heavily modified fork of Jasmine. Original license:
/*
Copyright (c) 2008-2016 Pivotal Labs

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

/* eslint-disable sort-keys */

class Suite {
  id;
  parentSuite;
  description;
  throwOnExpectationFailure;
  beforeFns;
  afterFns;
  beforeAllFns;
  afterAllFns;
  disabled;
  children;
  result;
  sharedContext;
  markedPending = false;
  markedTodo = false;
  isFocused = false;
  constructor(attrs) {
    this.id = attrs.id;
    this.parentSuite = attrs.parentSuite;
    this.description = (0, _jestUtil.convertDescriptorToString)(attrs.description);
    this.throwOnExpectationFailure = !!attrs.throwOnExpectationFailure;
    this.beforeFns = [];
    this.afterFns = [];
    this.beforeAllFns = [];
    this.afterAllFns = [];
    this.disabled = false;
    this.children = [];
    this.result = {
      id: this.id,
      description: this.description,
      fullName: this.getFullName(),
      failedExpectations: [],
      testPath: attrs.getTestPath()
    };
  }
  getFullName() {
    const fullName = [];
    for (
    // eslint-disable-next-line @typescript-eslint/no-this-alias
    let parentSuite = this; parentSuite; parentSuite = parentSuite.parentSuite) {
      if (parentSuite.parentSuite) {
        fullName.unshift(parentSuite.description);
      }
    }
    return fullName.join(' ');
  }
  disable() {
    this.disabled = true;
  }
  pend(_message) {
    this.markedPending = true;
  }
  beforeEach(fn) {
    this.beforeFns.unshift(fn);
  }
  beforeAll(fn) {
    this.beforeAllFns.push(fn);
  }
  afterEach(fn) {
    this.afterFns.unshift(fn);
  }
  afterAll(fn) {
    this.afterAllFns.unshift(fn);
  }
  addChild(child) {
    this.children.push(child);
  }
  status() {
    if (this.disabled) {
      return 'disabled';
    }
    if (this.markedPending) {
      return 'pending';
    }
    if (this.result.failedExpectations.length > 0) {
      return 'failed';
    } else {
      return 'finished';
    }
  }
  isExecutable() {
    return !this.disabled;
  }
  canBeReentered() {
    return this.beforeAllFns.length === 0 && this.afterAllFns.length === 0;
  }
  getResult() {
    this.result.status = this.status();
    return this.result;
  }
  sharedUserContext() {
    if (!this.sharedContext) {
      this.sharedContext = {};
    }
    return this.sharedContext;
  }
  clonedSharedUserContext() {
    return this.sharedUserContext();
  }
  onException(...args) {
    if (args[0] instanceof _ExpectationFailed.default) {
      return;
    }
    if (isAfterAll(this.children)) {
      const data = {
        matcherName: '',
        passed: false,
        expected: '',
        actual: '',
        error: arguments[0]
      };
      this.result.failedExpectations.push((0, _expectationResultFactory.default)(data));
    } else {
      for (const child of this.children) {
        child.onException.apply(child, args);
      }
    }
  }
  addExpectationResult(...args) {
    if (isAfterAll(this.children) && isFailure(args)) {
      const data = args[1];
      this.result.failedExpectations.push((0, _expectationResultFactory.default)(data));
      if (this.throwOnExpectationFailure) {
        throw new _ExpectationFailed.default();
      }
    } else {
      for (const child of this.children) {
        try {
          child.addExpectationResult.apply(child, args);
        } catch {
          // keep going
        }
      }
    }
  }

  // eslint-disable-next-line @typescript-eslint/no-empty-function
  execute(..._args) {}
}
exports["default"] = Suite;
function isAfterAll(children) {
  return children && children[0] && children[0].result.status;
}
function isFailure(args) {
  return !args[0];
}

/***/ },

/***/ "./src/jasmine/Timer.ts"
(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var Symbol = globalThis['jest-symbol-do-not-touch'] || globalThis.Symbol;
var Symbol = globalThis['jest-symbol-do-not-touch'] || globalThis.Symbol;
var jestNow = globalThis[Symbol.for('jest-native-now')] || globalThis.Date.now;
/**
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 */
// This file is a heavily modified fork of Jasmine. Original license:
/*
Copyright (c) 2008-2016 Pivotal Labs

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

const defaultNow = function (Date) {
  return function () {
    return jestNow();
  };
}(Date);
class Timer {
  start;
  elapsed;
  constructor(options) {
    options = options || {};
    const now = options.now || defaultNow;
    let startTime;
    this.start = function () {
      startTime = now();
    };
    this.elapsed = function () {
      return now() - startTime;
    };
  }
}
exports["default"] = Timer;

/***/ },

/***/ "./src/jasmine/createSpy.ts"
(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _CallTracker = _interopRequireDefault(__webpack_require__("./src/jasmine/CallTracker.ts"));
var _SpyStrategy = _interopRequireDefault(__webpack_require__("./src/jasmine/SpyStrategy.ts"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
/**
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 */
// This file is a heavily modified fork of Jasmine. Original license:
/*
Copyright (c) 2008-2016 Pivotal Labs

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/* eslint-disable sort-keys */

function createSpy(name, originalFn) {
  const spyStrategy = new _SpyStrategy.default({
    name,
    fn: originalFn,
    getSpy() {
      return spy;
    }
  });
  const callTracker = new _CallTracker.default();
  const spy = function (...args) {
    const callData = {
      object: this,
      args: Array.prototype.slice.apply(arguments)
    };
    callTracker.track(callData);
    const returnValue = spyStrategy.exec.apply(this, args);
    callData.returnValue = returnValue;
    return returnValue;
  };
  for (const prop in originalFn) {
    if (prop === 'and' || prop === 'calls') {
      throw new Error("Jasmine spies would overwrite the 'and' and 'calls' properties " + 'on the object being spied upon');
    }
    spy[prop] = originalFn[prop];
  }
  spy.and = spyStrategy;
  spy.calls = callTracker;
  return spy;
}
var _default = exports["default"] = createSpy;

/***/ },

/***/ "./src/jasmine/spyRegistry.ts"
(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = void 0;
var _CallTracker = _interopRequireDefault(__webpack_require__("./src/jasmine/CallTracker.ts"));
var _SpyStrategy = _interopRequireDefault(__webpack_require__("./src/jasmine/SpyStrategy.ts"));
var _createSpy = _interopRequireDefault(__webpack_require__("./src/jasmine/createSpy.ts"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
/**
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 */
// This file is a heavily modified fork of Jasmine. Original license:
/*
Copyright (c) 2008-2016 Pivotal Labs

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/

const formatErrorMsg = (domain, usage) => {
  const usageDefinition = usage ? `\nUsage: ${usage}` : '';
  return msg => `${domain} : ${msg}${usageDefinition}`;
};
function isSpy(putativeSpy) {
  if (!putativeSpy) {
    return false;
  }
  return putativeSpy.and instanceof _SpyStrategy.default && putativeSpy.calls instanceof _CallTracker.default;
}
const getErrorMsg = formatErrorMsg('<spyOn>', 'spyOn(<object>, <methodName>)');
class SpyRegistry {
  allowRespy;
  spyOn;
  clearSpies;
  respy;
  _spyOnProperty;
  constructor({
    currentSpies = () => []
  } = {}) {
    this.allowRespy = function (allow) {
      this.respy = allow;
    };
    this.spyOn = (obj, methodName, accessType) => {
      if (accessType) {
        return this._spyOnProperty(obj, methodName, accessType);
      }
      if (obj === void 0) {
        throw new Error(getErrorMsg(`could not find an object to spy upon for ${methodName}()`));
      }
      if (methodName === void 0) {
        throw new Error(getErrorMsg('No method name supplied'));
      }
      if (obj[methodName] === void 0) {
        throw new Error(getErrorMsg(`${methodName}() method does not exist`));
      }
      if (obj[methodName] && isSpy(obj[methodName])) {
        if (this.respy) {
          return obj[methodName];
        } else {
          throw new Error(getErrorMsg(`${methodName} has already been spied upon`));
        }
      }
      let descriptor;
      try {
        descriptor = Object.getOwnPropertyDescriptor(obj, methodName);
      } catch {
        // IE 8 doesn't support `definePropery` on non-DOM nodes
      }
      if (descriptor && !(descriptor.writable || descriptor.set)) {
        throw new Error(getErrorMsg(`${methodName} is not declared writable or has no setter`));
      }
      const originalMethod = obj[methodName];
      const spiedMethod = (0, _createSpy.default)(methodName, originalMethod);
      let restoreStrategy;
      if (Object.prototype.hasOwnProperty.call(obj, methodName)) {
        restoreStrategy = function () {
          obj[methodName] = originalMethod;
        };
      } else {
        restoreStrategy = function () {
          if (!delete obj[methodName]) {
            obj[methodName] = originalMethod;
          }
        };
      }
      currentSpies().push({
        restoreObjectToOriginalState: restoreStrategy
      });
      obj[methodName] = spiedMethod;
      return spiedMethod;
    };
    this._spyOnProperty = function (obj, propertyName, accessType = 'get') {
      if (!obj) {
        throw new Error(getErrorMsg(`could not find an object to spy upon for ${propertyName}`));
      }
      if (!propertyName) {
        throw new Error(getErrorMsg('No property name supplied'));
      }
      let descriptor;
      try {
        descriptor = Object.getOwnPropertyDescriptor(obj, propertyName);
      } catch {
        // IE 8 doesn't support `definePropery` on non-DOM nodes
      }
      if (!descriptor) {
        throw new Error(getErrorMsg(`${propertyName} property does not exist`));
      }
      if (!descriptor.configurable) {
        throw new Error(getErrorMsg(`${propertyName} is not declared configurable`));
      }
      if (!descriptor[accessType]) {
        throw new Error(getErrorMsg(`Property ${propertyName} does not have access type ${accessType}`));
      }
      if (obj[propertyName] && isSpy(obj[propertyName])) {
        if (this.respy) {
          return obj[propertyName];
        } else {
          throw new Error(getErrorMsg(`${propertyName} has already been spied upon`));
        }
      }
      const originalDescriptor = descriptor;
      const spiedProperty = (0, _createSpy.default)(propertyName, descriptor[accessType]);
      let restoreStrategy;
      if (Object.prototype.hasOwnProperty.call(obj, propertyName)) {
        restoreStrategy = function () {
          Object.defineProperty(obj, propertyName, originalDescriptor);
        };
      } else {
        restoreStrategy = function () {
          delete obj[propertyName];
        };
      }
      currentSpies().push({
        restoreObjectToOriginalState: restoreStrategy
      });
      const spiedDescriptor = {
        ...descriptor,
        [accessType]: spiedProperty
      };
      Object.defineProperty(obj, propertyName, spiedDescriptor);
      return spiedProperty;
    };
    this.clearSpies = function () {
      const spies = currentSpies();
      for (let i = spies.length - 1; i >= 0; i--) {
        const spyEntry = spies[i];
        spyEntry.restoreObjectToOriginalState();
      }
    };
  }
}
exports["default"] = SpyRegistry;

/***/ },

/***/ "./src/pTimeout.ts"
(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = pTimeout;
var Symbol = globalThis['jest-symbol-do-not-touch'] || globalThis.Symbol;
var Symbol = globalThis['jest-symbol-do-not-touch'] || globalThis.Symbol;
var Promise = globalThis[Symbol.for('jest-native-promise')] || globalThis.Promise;
/**
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

// A specialized version of `p-timeout` that does not touch globals.
// It does not throw on timeout.
function pTimeout(promise, ms, clearTimeout, setTimeout, onTimeout) {
  return new Promise((resolve, reject) => {
    const timer = setTimeout(() => resolve(onTimeout()), ms);
    promise.then(val => {
      clearTimeout(timer);
      resolve(val);
    }, error => {
      clearTimeout(timer);
      reject(error);
    });
  });
}

/***/ },

/***/ "./src/queueRunner.ts"
(__unused_webpack_module, exports, __webpack_require__) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = queueRunner;
var _jestUtil = require("jest-util");
var _PCancelable = _interopRequireDefault(__webpack_require__("./src/PCancelable.ts"));
var _pTimeout = _interopRequireDefault(__webpack_require__("./src/pTimeout.ts"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
var Symbol = globalThis['jest-symbol-do-not-touch'] || globalThis.Symbol;
var Symbol = globalThis['jest-symbol-do-not-touch'] || globalThis.Symbol;
var Promise = globalThis[Symbol.for('jest-native-promise')] || globalThis.Promise;
/**
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */
function queueRunner(options) {
  const token = new _PCancelable.default((onCancel, resolve) => {
    onCancel(resolve);
  });

  // eslint-disable-next-line unicorn/error-message
  const mapper = ({
    fn,
    timeout,
    initError = new Error()
  }) => {
    let promise = new Promise(resolve => {
      const next = function (...args) {
        const err = args[0];
        if (err) {
          options.fail.apply(null, args);
        }
        resolve();
      };
      next.fail = function (...args) {
        options.fail.apply(null, args);
        resolve();
      };
      try {
        fn.call(options.userContext, next);
      } catch (error) {
        options.onException(error);
        resolve();
      }
    });
    promise = Promise.race([promise, token]);
    if (!timeout) {
      return promise;
    }
    const timeoutMs = timeout();
    return (0, _pTimeout.default)(promise, timeoutMs, options.clearTimeout, options.setTimeout, () => {
      initError.message = `Timeout - Async callback was not invoked within the ${(0, _jestUtil.formatTime)(timeoutMs)} timeout specified by jest.setTimeout.`;
      initError.stack = initError.message + initError.stack;
      options.onException(initError);
    });
  };
  const result = options.queueableFns.reduce((promise, fn) => promise.then(() => mapper(fn)), Promise.resolve());
  return {
    cancel: token.cancel.bind(token),
    catch: result.catch.bind(result),
    // eslint-disable-next-line unicorn/no-thenable
    then: result.then.bind(result)
  };
}

/***/ },

/***/ "./src/treeProcessor.ts"
(__unused_webpack_module, exports) {



Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports["default"] = treeProcessor;
/**
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 */

// eslint-disable-next-line @typescript-eslint/no-empty-function
const noop = () => {};
function getNodeWithoutChildrenHandler(node, enabled) {
  return function fn(done = noop) {
    node.execute(done, enabled);
  };
}
function hasNoEnabledTest(node) {
  return node.disabled || node.markedPending || (node.children?.every(hasNoEnabledTest) ?? false);
}
function treeProcessor(options) {
  const {
    nodeComplete,
    nodeStart,
    queueRunnerFactory,
    runnableIds,
    tree
  } = options;
  function isEnabled(node, parentEnabled) {
    return parentEnabled || runnableIds.includes(node.id);
  }
  function getNodeHandler(node, parentEnabled) {
    const enabled = isEnabled(node, parentEnabled);
    return node.children ? getNodeWithChildrenHandler(node, enabled) : getNodeWithoutChildrenHandler(node, enabled);
  }
  function getNodeWithChildrenHandler(node, enabled) {
    return async function fn(done = noop) {
      nodeStart(node);
      await queueRunnerFactory({
        onException: error => node.onException(error),
        queueableFns: wrapChildren(node, enabled),
        userContext: node.sharedUserContext()
      });
      nodeComplete(node);
      done();
    };
  }
  function wrapChildren(node, enabled) {
    if (!node.children) {
      throw new Error('`node.children` is not defined.');
    }
    const children = node.children.map(child => ({
      fn: getNodeHandler(child, enabled)
    }));
    if (hasNoEnabledTest(node)) {
      return children;
    }
    return [...node.beforeAllFns, ...children, ...node.afterAllFns];
  }
  const treeHandler = getNodeHandler(tree, false);
  return treeHandler();
}

/***/ }

/******/ 	});
/************************************************************************/
/******/ 	// The module cache
/******/ 	const __webpack_module_cache__ = {};
/******/ 	
/******/ 	// The require function
/******/ 	function __webpack_require__(moduleId) {
/******/ 		// Check if module is in cache
/******/ 		const cachedModule = __webpack_module_cache__[moduleId];
/******/ 		if (cachedModule !== undefined) {
/******/ 			return cachedModule.exports;
/******/ 		}
/******/ 		// Create a new module (and put it into the cache)
/******/ 		const module = __webpack_module_cache__[moduleId] = {
/******/ 			// no module.id needed
/******/ 			// no module.loaded needed
/******/ 			exports: {}
/******/ 		};
/******/ 	
/******/ 		// Execute the module function
/******/ 		__webpack_modules__[moduleId](module, module.exports, __webpack_require__);
/******/ 	
/******/ 		// Return the exports of the module
/******/ 		return module.exports;
/******/ 	}
/******/ 	
/************************************************************************/
let __webpack_exports__ = {};
// This entry needs to be wrapped in an IIFE because it uses a non-standard name for the exports (exports).
(() => {
let exports = __webpack_exports__;


Object.defineProperty(exports, "__esModule", ({
  value: true
}));
exports.create = exports._interface = void 0;
var _Env = _interopRequireDefault(__webpack_require__("./src/jasmine/Env.ts"));
var _JsApiReporter = _interopRequireDefault(__webpack_require__("./src/jasmine/JsApiReporter.ts"));
var _ReportDispatcher = _interopRequireDefault(__webpack_require__("./src/jasmine/ReportDispatcher.ts"));
var _Spec = _interopRequireDefault(__webpack_require__("./src/jasmine/Spec.ts"));
var _Suite = _interopRequireDefault(__webpack_require__("./src/jasmine/Suite.ts"));
var _Timer = _interopRequireDefault(__webpack_require__("./src/jasmine/Timer.ts"));
var _createSpy = _interopRequireDefault(__webpack_require__("./src/jasmine/createSpy.ts"));
var _spyRegistry = _interopRequireDefault(__webpack_require__("./src/jasmine/spyRegistry.ts"));
function _interopRequireDefault(e) { return e && e.__esModule ? e : { default: e }; }
var jasmineLight_Symbol = globalThis['jest-symbol-do-not-touch'] || globalThis.Symbol;
/**
 * Copyright (c) Meta Platforms, Inc. and affiliates.
 *
 * This source code is licensed under the MIT license found in the
 * LICENSE file in the root directory of this source tree.
 *
 */
// This file is a heavily modified fork of Jasmine. Original license:
/*
Copyright (c) 2008-2016 Pivotal Labs

Permission is hereby granted, free of charge, to any person obtaining
a copy of this software and associated documentation files (the
"Software"), to deal in the Software without restriction, including
without limitation the rights to use, copy, modify, merge, publish,
distribute, sublicense, and/or sell copies of the Software, and to
permit persons to whom the Software is furnished to do so, subject to
the following conditions:

The above copyright notice and this permission notice shall be
included in all copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
*/
/* eslint-disable sort-keys */
const testTimeoutSymbol = jasmineLight_Symbol.for('TEST_TIMEOUT_SYMBOL');
const create = function (createOptions) {
  const j$ = {
    ...createOptions
  };
  Object.defineProperty(j$, '_DEFAULT_TIMEOUT_INTERVAL', {
    configurable: true,
    enumerable: true,
    get() {
      return globalThis[testTimeoutSymbol] || createOptions.testTimeout || 5000;
    },
    set(value) {
      globalThis[testTimeoutSymbol] = value;
    }
  });
  j$.getEnv = function () {
    const env = j$.currentEnv_ = j$.currentEnv_ || new j$.Env();
    //jasmine. singletons in here (setTimeout blah blah).
    return env;
  };
  j$.createSpy = _createSpy.default;
  j$.Env = (0, _Env.default)(j$);
  j$.JsApiReporter = _JsApiReporter.default;
  j$.ReportDispatcher = _ReportDispatcher.default;
  j$.Spec = _Spec.default;
  j$.SpyRegistry = _spyRegistry.default;
  j$.Suite = _Suite.default;
  j$.Timer = _Timer.default;
  j$.version = '2.5.2-light';
  return j$;
};

// Interface is a reserved word in strict mode, so can't export it as ESM
exports.create = create;
const _interface = function (jasmine, env) {
  const jasmineInterface = {
    describe(description, specDefinitions) {
      return env.describe(description, specDefinitions);
    },
    xdescribe(description, specDefinitions) {
      return env.xdescribe(description, specDefinitions);
    },
    fdescribe(description, specDefinitions) {
      return env.fdescribe(description, specDefinitions);
    },
    it() {
      return env.it.apply(env, arguments);
    },
    xit() {
      return env.xit.apply(env, arguments);
    },
    fit() {
      return env.fit.apply(env, arguments);
    },
    beforeEach() {
      if (typeof arguments[0] !== 'function') {
        throw new TypeError('Invalid first argument. It must be a callback function.');
      }
      return env.beforeEach.apply(env, arguments);
    },
    afterEach() {
      if (typeof arguments[0] !== 'function') {
        throw new TypeError('Invalid first argument. It must be a callback function.');
      }
      return env.afterEach.apply(env, arguments);
    },
    beforeAll() {
      if (typeof arguments[0] !== 'function') {
        throw new TypeError('Invalid first argument. It must be a callback function.');
      }
      return env.beforeAll.apply(env, arguments);
    },
    afterAll() {
      if (typeof arguments[0] !== 'function') {
        throw new TypeError('Invalid first argument. It must be a callback function.');
      }
      return env.afterAll.apply(env, arguments);
    },
    pending() {
      return env.pending.apply(env, arguments);
    },
    fail() {
      return env.fail.apply(env, arguments);
    },
    spyOn(obj, methodName, accessType) {
      return env.spyOn(obj, methodName, accessType);
    },
    jsApiReporter: new jasmine.JsApiReporter({
      timer: new jasmine.Timer()
    }),
    jasmine
  };
  return jasmineInterface;
};
exports._interface = _interface;
})();

module.exports = __webpack_exports__;
/******/ })()
;