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AA,CAAkB,GAChB,KAAK,IAAI,UAAU,CAAC,kBAAmB,GACzC,CAiCA,aAAM,CAAQ,EAAO,GAUnB,SATM,KAAK,qBACL,KAAK,cACN,KAAK,2BACR,KAAK,yBAAyB,CAC5B,MAAO,KAAK,cACZ,uBAAwB,KAAK,0BAI7B,EACF,GAAsB,iBAAX,GAAuB,aAAkB,OAClD,KAAK,IAAI,UAAU,CACjB,WAAY,gBAAgB,SAEzB,KAAI,EAAO,KAKhB,MAAM,IAAI,MAAM,4BAJhB,KAAK,IAAI,UAAU,CACjB,WAAY,eAAe,EAAO,OAItC,CAGE,GAAS,EAAM,OAAS,IACtB,KAAK,YACP,QAAQ,IAAI,gJAGd,KAAK,QAAU,GACf,KAAK,UAAY,GACjB,KAAK,qBAAqB,IAG5B,MAAM,EAAuB,IAAI,aAAY,IAAM,KAAK,KAAK,KAE7D,IAAI,EADJ,EAAqB,UAGrB,UACQ,KAAK,oBAAmB,gBACtB,KAAK,YACX,QAAsB,KAAK,IAAI,SAAS,GAE5C,CAAE,cACM,KAAK,cACX,EAAqB,WACvB,CAMA,OAJI,KAAK,kBACP,KAAK,KAAK,WAAW,kBAAkB,EAAc,gBAGhD,CACT,CAMA,eAAM,GAKJ,aAJM,KAAK,qBACL,KAAK,oBACL,KAAK,YAEJ,KAAK,IAAI,WAAW,SAAS,IAAI,kBAC1C,EAGF,SAAS,kBAAkB,GAUzB,MAAM,EAAS,CACb,YAAa,EAAgB,aAU/B,YAPiC,IAA7B,EAAgB,SAClB,EAAO,KAAO,QAEd,EAAO,KAAO,QACd,EAAO,SAAW,EAAgB,SAAS,IAAI,oBAG1C,CACT,CAEA,OAAO,QAAU","file":"/npm/jasmine@6.2.0/lib/jasmine.js","sourceRoot":"","sourcesContent":["/**\n * Minified by jsDelivr using Terser v5.39.0.\n * Original file: /npm/jasmine@6.2.0/lib/jasmine.js\n *\n * Do NOT use SRI with dynamically generated files! More information: https://www.jsdelivr.com/using-sri-with-dynamic-files\n */\n","const ExitHandler = require('./exit_handler');\nconst regexSpecFilter = require('./filters/regex_spec_filter');\nconst pathSpecFilter = require('./filters/path_spec_filter');\nconst RunnerBase = require('./runner_base');\n\n/**\n * Options for the {@link Jasmine} constructor\n * @name JasmineOptions\n * @interface\n */\n/**\n * The path to the project's base directory. This can be absolute or relative\n * to the current working directory. If it isn't specified, the current working\n * directory will be used.\n * @name JasmineOptions#projectBaseDir\n * @type (string | undefined)\n */\n/**\n * Whether to create the globals (describe, it, etc) that make up Jasmine's\n * spec-writing interface. If it is set to false, the spec-writing interface\n * can be accessed via jasmine-core's `noGlobals` method, e.g.:\n *\n * `const {describe, it, expect, jasmine} = require('jasmine-core').noGlobals();`\n *\n * @name JasmineOptions#globals\n * @type (boolean | undefined)\n * @default true\n */\n\n/**\n * @classdesc Configures, builds, and executes a Jasmine test suite.<br>See also {@link ParallelRunner} which provides equivalent functionality for parallel execution.\n * @param {(JasmineOptions | undefined)} options\n * @constructor\n * @name Jasmine\n * @extends Runner\n * @example\n * const Jasmine = require('jasmine');\n * const runner = new Jasmine();\n */\nclass Jasmine extends RunnerBase {\n  constructor(options) {\n    options = options || {};\n    super(options);\n    const jasmineCore = options.jasmineCore || require('jasmine-core');\n\n    if (options.globals === false) {\n      this.jasmine = jasmineCore.noGlobals().jasmine;\n    } else {\n      this.jasmine = jasmineCore.boot();\n    }\n\n    /**\n     * The Jasmine environment.\n     * @name Jasmine#env\n     * @readonly\n     * @see {@link https://jasmine.github.io/api/edge/Env.html|Env}\n     * @type {Env}\n     */\n    this.env = this.jasmine.getEnv({suppressLoadErrors: true});\n    this.reportersCount = 0;\n    this.exit = process.exit;\n    this.addReporter(this.reporter_);\n\n    /**\n     * @function\n     * @name Jasmine#coreVersion\n     * @return {string} The version of jasmine-core in use\n     */\n    this.coreVersion = function() {\n      return jasmineCore.version();\n    };\n\n    // Public. See RunnerBase.\n    this.exitOnCompletion = true;\n  }\n\n  /**\n   * Sets whether to randomize the order of specs.\n   * @function\n   * @name Jasmine#randomizeTests\n   * @param {boolean} value Whether to randomize\n   */\n  randomizeTests(value) {\n    this.env.configure({random: value});\n  }\n\n  /**\n   * Sets the random seed.\n   * @function\n   * @name Jasmine#seed\n   * @param {number} seed The random seed\n   */\n  seed(value) {\n    this.env.configure({seed: value});\n  }\n\n  // Public. See RunnerBase jsdocs.\n  addReporter(reporter) {\n    this.env.addReporter(reporter);\n    this.reportersCount++;\n  }\n\n  // Public. See RunnerBase jsdocs.\n  clearReporters() {\n    this.env.clearReporters();\n    this.reportersCount = 0;\n  }\n\n  /**\n   * Provide a fallback reporter if no other reporters have been specified.\n   * @function\n   * @name Jasmine#provideFallbackReporter\n   * @param reporter The fallback reporter\n   * @see custom_reporter\n   */\n  provideFallbackReporter(reporter) {\n    this.env.provideFallbackReporter(reporter);\n  }\n\n  /**\n   * Add custom matchers for the current scope of specs.\n   *\n   * _Note:_ This is only callable from within a {@link beforeEach}, {@link it}, or {@link beforeAll}.\n   * @function\n   * @name Jasmine#addMatchers\n   * @param {Object} matchers - Keys from this object will be the new matcher names.\n   * @see custom_matcher\n   */\n  addMatchers(matchers) {\n    this.env.addMatchers(matchers);\n  }\n\n  async loadSpecs() {\n    await this._loadFiles(this.specFiles);\n  }\n\n  async loadHelpers() {\n    await this._loadFiles(this.helperFiles);\n  }\n\n  async _loadFiles(files) {\n    for (const file of files) {\n      await this.loader.load(file);\n    }\n  }\n\n  async loadRequires() {\n    await this._loadFiles(this.requires);\n  }\n\n  configureEnv(envConfig) {\n    this.env.configure(envConfig);\n  }\n\n  /**\n   * Sets whether to cause specs to only have one expectation failure.\n   * @function\n   * @name Jasmine#stopSpecOnExpectationFailure\n   * @param {boolean} value Whether to cause specs to only have one expectation\n   * failure\n   */\n  stopSpecOnExpectationFailure(value) {\n    this.env.configure({stopSpecOnExpectationFailure: value});\n  }\n\n  /**\n   * Sets whether to stop execution of the suite after the first spec failure.\n   * @function\n   * @name Jasmine#stopOnSpecFailure\n   * @param {boolean} value Whether to stop execution of the suite after the\n   * first spec failure\n   */\n  stopOnSpecFailure(value) {\n    this.env.configure({stopOnSpecFailure: value});\n  }\n\n  /**\n   * Runs the test suite.\n   *\n   * _Note_: Set {@link Jasmine#exitOnCompletion|exitOnCompletion} to false if you\n   * intend to use the returned promise. Otherwise, the Node process will\n   * ordinarily exit before the promise is settled.\n   * @param {Array.<string>} [files] Spec files to run instead of the previously\n   * configured set\n   * @param {string|RegExp|object} [filter] Optional specification of what specs to run.\n   * Can be a RegExp, a string, or an object. If it's a RegExp, it will be matched\n   * against the full names of specs. If it's a string, it will be converted to\n   * a RegExp and then handled in the same way. If it's\n   * an object, it should have a path property whose value is an array of spec\n   * or suite descriptions.\n   * Regex used to filter specs. If specified, only\n   * specs with matching full names will be run.\n   * @return {Promise<JasmineDoneInfo>} Promise that is resolved when the suite completes.\n   * @example\n   * // Run all specs\n   * await jasmine.execute();\n   *\n   * // Run just spec/someSpec.js\n   * await jasmine.execute(['spec/someSpec.js']);\n   *\n   * // Run all specs with full paths starting with \"a suite a child suite\"\n   * await jasmine.execute(null, '^a suite a child suite');\n   *\n   * // Run all specs that are inside a suite named \"a child suite\" that is\n   * // a child of a top-level suite named \"a suite\"\n   * await jasmine.execute(null, {path: ['a suite', 'a child suite']});\n   */\n  async execute(files, filter) {\n    await this.loadRequires();\n    await this.loadHelpers();\n    if (!this.defaultReporterConfigured) {\n      this.configureDefaultReporter({\n        color: this.showingColors,\n        alwaysListPendingSpecs: this.alwaysListPendingSpecs_\n      });\n    }\n\n    if (filter) {\n      if (typeof filter === 'string' || filter instanceof RegExp) {\n        this.env.configure({\n          specFilter: regexSpecFilter(filter)\n        });\n      } else if (filter.path) {\n        this.env.configure({\n          specFilter: pathSpecFilter(filter.path)\n        });\n      } else {\n        throw new Error('Unrecognized filter type');\n      }\n    }\n\n    if (files && files.length > 0) {\n      if (this.isVerbose_) {\n        console.log('Overriding previous specDir and specFiles because a list of spec files was provided on the command line or as an argument to Jasmine#execute');\n      }\n\n      this.specDir = '';\n      this.specFiles = [];\n      this.addMatchingSpecFiles(files);\n    }\n\n    const prematureExitHandler = new ExitHandler(() => this.exit(4));\n    prematureExitHandler.install();\n    let overallResult;\n\n    try {\n      await this.withinGlobalSetup_(async () => {\n        await this.loadSpecs();\n        overallResult = await this.env.execute();\n      });\n    } finally {\n      await this.flushOutput();\n      prematureExitHandler.uninstall();\n    }\n\n    if (this.exitOnCompletion) {\n      this.exit(RunnerBase.exitCodeForStatus(overallResult.overallStatus));\n    }\n\n    return overallResult;\n  }\n\n  /**\n   * Returns a tree of suites and specs without actually running the specs.\n   * @return {Promise<EnumeratedSuiteOrSpec[]>}\n   */\n  async enumerate() {\n    await this.loadRequires();\n    await this.loadHelpers();\n    await this.loadSpecs();\n\n    return this.env.topSuite().children.map(toEnumerateResult);\n  }\n}\n\nfunction toEnumerateResult(suiteOrSpecMeta) {\n  // Omit parent links to avoid JSON serialization failure due to circular\n  // references. Omit IDs since they aren't stable across executions. Add\n  // type information to make interpreting the output easier.\n\n  /**\n   * @interface EnumeratedSuiteOrSpec\n   * @property {string} type - 'suite' or 'spec'\n   * @property {EnumeratedSuiteOrSpec[]} [children] - Only defined for suites\n   */\n  const result = {\n    description: suiteOrSpecMeta.description\n  };\n\n  if (suiteOrSpecMeta.children === undefined) {\n    result.type = 'spec';\n  } else {\n    result.type = 'suite';\n    result.children = suiteOrSpecMeta.children.map(toEnumerateResult);\n  }\n\n  return result;\n}\n\nmodule.exports = Jasmine;\n"]}