{
  "version": 3,
  "sources": ["../src/index.ts", "../node_modules/esm-test-parser/src/parser/keywords.ts", "../node_modules/esm-test-parser/src/parser/utils/testOnlyUtils.ts", "../node_modules/esm-test-parser/src/decorators/decoratorUtils.ts", "../node_modules/esm-test-parser/src/decorators/testOnly.ts", "../node_modules/esm-test-parser/src/decorators/testTitle.ts", "../node_modules/esm-test-parser/src/decorators/testCase.ts", "../node_modules/esm-test-parser/src/parser/models/testCollection.ts", "../node_modules/esm-test-parser/node_modules/@esm-test/guards/src/guardComplexObject.ts", "../node_modules/esm-test-parser/node_modules/@esm-test/guards/src/guardEmpty.ts", "../node_modules/esm-test-parser/node_modules/@esm-test/guards/src/guardNull.ts", "../node_modules/esm-test-parser/node_modules/@esm-test/guards/src/guardType.ts", "../node_modules/esm-test-parser/node_modules/@esm-test/guards/src/guardUndefined.ts", "../node_modules/esm-test-parser/node_modules/@esm-test/guards/src/guardAggregates.ts", "../node_modules/esm-test-parser/node_modules/@esm-test/guards/src/guardInstance.ts", "../node_modules/esm-test-parser/node_modules/@esm-test/guards/src/guardObjectKey.ts", "../node_modules/esm-test-parser/src/parser/utils/testCaseUtils.ts", "../node_modules/esm-test-parser/src/options/testParserFlags.ts", "../node_modules/esm-test-parser/src/options/testParserOptions.ts", "../node_modules/esm-test-parser/src/parser/models/objectField.ts", "../node_modules/esm-test-parser/src/parser/parseObjectFields.ts", "../node_modules/esm-test-parser/src/parser/models/classInstanceField.ts", "../node_modules/esm-test-parser/src/parser/parseClassInstFields.ts", "../node_modules/esm-test-parser/src/processors/models/preProcessContext.ts", "../node_modules/esm-test-parser/src/processors/pre/all.ts", "../node_modules/esm-test-parser/src/parser/utils/classUtils.ts", "../node_modules/esm-test-parser/src/parser/utils/testTitleUtils.ts", "../node_modules/esm-test-parser/src/processors/pre/processClassDef.ts", "../node_modules/esm-test-parser/src/processors/pre/processClassInstance.ts", "../node_modules/esm-test-parser/src/processors/pre/processClassInstFunction.ts", "../node_modules/esm-test-parser/src/processors/pre/processDefaultExport.ts", "../node_modules/esm-test-parser/src/processors/pre/processFunction.ts", "../node_modules/esm-test-parser/src/processors/pre/processFunctionWithCasesArray.ts", "../node_modules/esm-test-parser/src/parser/utils/moduleUtils.ts", "../node_modules/esm-test-parser/src/processors/pre/processModule.ts", "../node_modules/esm-test-parser/src/processors/pre/processObject.ts", "../node_modules/esm-test-parser/src/processors/pre/processOnlyField.ts", "../node_modules/esm-test-parser/src/processors/executePreProcessing.ts", "../node_modules/esm-test-parser/src/processors/pre/preProcessUtils.ts", "../node_modules/esm-test-parser/src/parser/models/testType.ts", "../node_modules/esm-test-parser/src/parser/models/test.ts", "../node_modules/esm-test-parser/src/processors/models/postProcessContext.ts", "../node_modules/esm-test-parser/src/processors/post/all.ts", "../node_modules/esm-test-parser/src/processors/post/processClassInstTestCases.ts", "../node_modules/esm-test-parser/src/processors/post/postProcessUtils.ts", "../node_modules/esm-test-parser/src/processors/post/processHasOnly.ts", "../node_modules/esm-test-parser/src/processors/post/processTestCases.ts", "../node_modules/esm-test-parser/src/processors/executePostProcessing.ts", "../node_modules/esm-test-parser/src/extractTestsFromModule.ts", "../node_modules/esm-test-parser/src/index.ts", "../src/mochaUiEsmOptions.ts", "../src/getTestsFromEsmModule.ts"],
  "sourcesContent": ["import * as Mocha from 'mocha';\nimport { MochaUiEsmOptions } from './mochaUiEsmOptions.js';\nimport { getTestsFromEsmModule } from './getTestsFromEsmModule.js';\n\n/**\n * Represents the Mocha interfaces record.\n */\nexport type MochaInterfaces = Record<string, (suite: Mocha.Suite) => void>;\n\n/**\n * Registers the Mocha UI for ESM.\n * \n * This adds an `esm` property to the provided Mocha interfaces. When a suite is configured\n * with the `esm` UI, it will listen for the `modules` event and parse test definitions\n * from the provided ESM modules.\n *\n * @param mochaInterfaces - The Mocha interfaces to register the UI with.\n * @param options - Optional configuration for the ESM test runner.\n */\nexport function registerMochaUiEsm(\n  mochaInterfaces: MochaInterfaces,\n  options?: Partial<MochaUiEsmOptions>\n): void {\n  mochaInterfaces.esm = function (suite: Mocha.Suite) {\n    suite.on('modules', (modules: any) =>\n      getTestsFromEsmModule(suite, new MochaUiEsmOptions(options), modules)\n    );\n  };\n}\n\nexport default registerMochaUiEsm;\nexport * from 'esm-test-parser';\nexport { MochaUiEsmOptions };\n", "const only = \"__test.only__\";\r\nconst title = \"__test.title__\";\r\nconst cases = \"__test.cases__\";\r\nconst defaultExport = \"default\";\r\nconst moduleTag = \"Module\";\r\n\r\n/**\r\n * Property names used for storing test metadata on modules, classes, and functions.\r\n */\r\nexport const keywords = {\r\n  /** Property used to mark a test as 'only'. */\r\n  only,\r\n  /** Property used to store a custom title for a test. */\r\n  title,\r\n  /** Property used to store parameterized test cases. */\r\n  cases,\r\n  /** The standard name for a default export in a module. */\r\n  defaultExport,\r\n  /** A tag used to identify a module. */\r\n  moduleTag\r\n}\r\n", "import { keywords } from \"../keywords.js\";\r\nimport { TestParserOptions } from \"../../options/testParserOptions.js\";\r\n\r\n/**\r\n * Checks if a property name matches the 'only' keyword or literal.\r\n * \r\n * @param name - The property name.\r\n * @param options - Parser options.\r\n * @returns True if the property indicates an 'only' execution filter.\r\n */\r\nexport function isOnlyField(name: string, options: TestParserOptions): boolean {\r\n  return name === keywords.only\r\n    || (options.parserFlags!.allowLiteralOnly && name === \"only\");\r\n}\r\n\r\n/**\r\n * Checks if an object has an 'only' property (via metadata or literal).\r\n * \r\n * @param value - The object to check.\r\n * @param options - Parser options.\r\n * @returns True if the object has an 'only' property.\r\n */\r\nexport function hasOnly(value: any, options: TestParserOptions): boolean {\r\n  return Object.hasOwn(value, keywords.only)\r\n    || (options.parserFlags!.allowLiteralOnly && Object.hasOwn(value, \"only\"))\r\n}\r\n\r\n/**\r\n * Checks if an object has an 'only' decorator with a supported expression.\r\n * \r\n * @param value - The object to check.\r\n * @returns True if the object has a valid 'only' decorator.\r\n */\r\nexport function hasOnlyDecorator(value: any): boolean {\r\n  return Object.hasOwn(value, keywords.only)\r\n    && isOnlyExpressionSupported(value[keywords.only]);\r\n}\r\n\r\n\r\n/**\r\n * Validates if an 'only' expression (number, boolean, or '*') is supported.\r\n * \r\n * @param expression - The expression value.\r\n * @returns True if the expression is a supported type.\r\n */\r\nexport function isOnlyExpressionSupported(expression: any): boolean {\r\n  const isNumber = typeof (+expression) === 'number' && +expression > 0;\r\n  const isStar = expression === '*';\r\n\r\n  return isNumber || isStar;\r\n}\r\n", "/**\r\n * Metadata extracted from a decorator's context to identify its target.\r\n */\r\nexport interface DecoratorInfo {\r\n  /** Whether the decorator is applied to a class definition. */\r\n  isClass: boolean;\r\n  /** The name of the property or method the decorator is applied to. */\r\n  key?: string;\r\n}\r\n\r\n/**\r\n * Normalizes decorator context for both TypeScript and Babel environments.\r\n * \r\n * @param key - The decorator's target context (property name or Babel descriptor).\r\n * @returns {@link DecoratorInfo} describing the target.\r\n */\r\nexport const getDecoratorInfo = (key: any): DecoratorInfo => {\r\n  // babel\r\n  if (key instanceof Object) {\r\n    return {\r\n      isClass: key.kind === 'class',\r\n      key: key.name\r\n    };\r\n  }\r\n\r\n  // typescript\r\n  if (key == undefined) {\r\n    return { isClass: true };\r\n  };\r\n\r\n  return { isClass: false, key };\r\n}\r\n", "import { keywords } from '../parser/keywords.js';\r\nimport { isOnlyExpressionSupported } from '../parser/utils/testOnlyUtils.js';\r\nimport { getDecoratorInfo } from './decoratorUtils.js';\r\n\r\n/**\r\n * Decorator to mark a test class or function as 'only' for execution filtering.\r\n * \r\n * When applied to a class, it marks the entire suite.\r\n * When applied to a method, it marks that specific test.\r\n * \r\n * @param expressionArg - Optional filter expression:\r\n * - `true` or no argument: Runs the test.\r\n * - `number`: Number of tests to run from the group.\r\n * - `'*'`: Runs all tests in the group.\r\n */\r\nexport function testOnly(expressionArg?: number | string) {\r\n  const expression = arguments.length === 0 ? 1 : expressionArg;\r\n\r\n  return function (targetProto: any, childKey?: string) {\r\n    const decInfo = getDecoratorInfo(childKey);\r\n    const exprSupported = isOnlyExpressionSupported(expression);\r\n\r\n    if (decInfo.isClass && exprSupported === false) {\r\n      throw new Error(createErrorMessage(expression, targetProto.name));\r\n    }\r\n\r\n    if (decInfo.isClass) {\r\n      targetProto[keywords.only] = true;\r\n      return;\r\n    }\r\n\r\n    const target = targetProto[decInfo.key!];\r\n    const isFunction = target instanceof Function;\r\n\r\n    if (isFunction === false) {\r\n      throw new Error(createErrorMessage(expression, targetProto.constructor.name));\r\n    }\r\n\r\n    if (exprSupported === false) {\r\n      throw new Error(createErrorMessage(expression, targetProto.constructor.name));\r\n    }\r\n\r\n    target[keywords.only] = expression === undefined ? 1 : expression;\r\n  }\r\n}\r\n\r\nfunction createErrorMessage(expression: any, targetName: string) {\r\n  return `testOnly('${expression}') expression on '${targetName}' not supported`;\r\n}\r\n", "import { keywords } from '../parser/keywords.js';\r\nimport { getDecoratorInfo } from './decoratorUtils.js';\r\n\r\n/**\r\n * Decorator to assign a custom display title to a test class or function.\r\n * \r\n * @param title - The custom title string.\r\n */\r\nexport function testTitle(title: string) {\r\n\r\n  return function (targetProto: any, childKey?: string) {\r\n    const decInfo = getDecoratorInfo(childKey);\r\n\r\n    if (decInfo.isClass) {\r\n      targetProto[keywords.title] = title;\r\n      return;\r\n    }\r\n\r\n    const target = targetProto[decInfo.key!];\r\n    const isFunction = target instanceof Function;\r\n    if (isFunction == false) return;\r\n\r\n    target[keywords.title] = title;\r\n  }\r\n\r\n}\r\n", "import { keywords } from '../parser/keywords.js';\r\nimport { getDecoratorInfo } from './decoratorUtils.js';\r\n\r\n/**\r\n * Decorator to define arguments for parameterized tests.\r\n * Each application of this decorator adds a new test case to the target function.\r\n * \r\n * @param args - The arguments to pass to the test function.\r\n */\r\nexport function testCase(...args: any[]) {\r\n\r\n  return function (targetProto: any, childKey?: string) {\r\n    const decInfo = getDecoratorInfo(childKey);\r\n    if (decInfo.isClass) return;\r\n\r\n    const target = targetProto[decInfo.key!];\r\n    const isFunction = target instanceof Function;\r\n    if (isFunction == false) return;\r\n\r\n    const testCases = target[keywords.cases] || (target[keywords.cases] = []);\r\n\r\n    testCases.push([...args]);\r\n  }\r\n\r\n}\r\n", "import { Test } from \"./test.js\";\r\n\r\nexport type CompareMethod = (a: Test, b: Test) => number;\r\n\r\n/**\r\n * Represents a collection of tests with helper methods for filtering and sorting.\r\n * Extends the native Array for convenient test management.\r\n */\r\nexport class TestCollection extends Array<Test> {\r\n\r\n  /**\r\n   * Initializes a new TestCollection.\r\n   * @param initialArray - Optional initial array of tests to populate the collection.\r\n   */\r\n  constructor (initialArray?: Test[]) {\r\n    super();\r\n    if (initialArray && initialArray.length > 0) {\r\n      this.push(...initialArray);\r\n    }\r\n  }\r\n\r\n  /**\r\n   * Returns a new array containing the tests sorted by the specified comparison logic.\r\n   * @param compareMethod - The function used to determine the sort order.\r\n   * @returns A sorted array of tests.\r\n   */\r\n  sortBy(compareMethod: CompareMethod): Test[] {\r\n    return this.slice().sort(compareMethod);\r\n  }\r\n\r\n  /**\r\n   * Filters the collection for tests that exactly match the specified type bitmask.\r\n   * @param isType - The type bitmask to match.\r\n   * @returns An array of tests matching the type.\r\n   */\r\n  filterIs(isType: number): Test[] {\r\n    return this.filter(x => x.type.is(isType));\r\n  }\r\n\r\n  /**\r\n   * Filters the collection for tests that exactly match any of the specified type bitmasks.\r\n   * @param isTypes - The type bitmasks to check against.\r\n   * @returns An array of tests matching any of the types.\r\n   */\r\n  filterIsEither(...isTypes: number[]): Test[] {\r\n    return this.filter(x => x.type.isEither(...isTypes));\r\n  }\r\n\r\n  /**\r\n   * Filters the collection for tests that have at least one of the specified type bits set.\r\n   * @param hasType - The type bit to check for.\r\n   * @returns An array of tests containing the type bit.\r\n   */\r\n  filterHas(hasType: number): Test[] {\r\n    return this.filter(x => x.type.has(hasType));\r\n  }\r\n\r\n  /**\r\n   * Filters the collection for tests that have at least one of the specified type bits set from any of the arguments.\r\n   * @param hasTypes - The type bits to check for.\r\n   * @returns An array of tests containing any of the type bits.\r\n   */\r\n  filterHasEither(...hasTypes: number[]): Test[] {\r\n    return this.filter(x => x.type.hasEither(...hasTypes));\r\n  }\r\n\r\n}\r\n\r\n/**\r\n * SortByEnum\r\n */\r\nexport enum SortByEnum {\r\n  /**\r\n   * Sorts groups and tests\r\n   */\r\n  \"all\" = \"all\",\r\n  /**\r\n   * Sort groups only\r\n   */\r\n  \"groupsOnly\" = \"groupsOnly\",\r\n  /**\r\n   * Sort tests only\r\n   */\r\n  \"testsOnly\" = \"testsOnly\",\r\n  /**\r\n   * No sort\r\n   */\r\n  \"none\" = \"none\"\r\n}\r\n\r\nexport const SortByMethod: Record<string, CompareMethod> = {\r\n  /**\r\n   * groupsOnly\r\n   */\r\n  groupsOnly: function (a, b) {\r\n    // only process groups\r\n    if (a.isGroup === false && b.isGroup === false) return 0;\r\n    if (a.isGroup === false) return 1;\r\n    if (b.isGroup === false) return -1;\r\n\r\n    // sort by group name first\r\n    const groupComare = stringCompare(a.groupName, b.groupName);\r\n    if (groupComare !== 0) return groupComare;\r\n\r\n    // sort by name when in the same group\r\n    return stringCompare(a.name, b.name);\r\n  },\r\n  /**\r\n   * testsOnly\r\n   */\r\n  testsOnly: function (a, b) {\r\n    // only process tests\r\n    if (a.isGroup && b.isGroup) return 0;\r\n    if (a.isGroup) return -1;\r\n    if (b.isGroup) return 1;\r\n\r\n    // sort by test name\r\n    return stringCompare(a.name, b.name);\r\n  },\r\n  /**\r\n   * all\r\n   */\r\n  all: function (a, b) {\r\n    const compare = SortByMethod.groupsOnly(a, b)\r\n    if (compare === 0) return SortByMethod.testsOnly(a, b);\r\n    return compare;\r\n  }\r\n}\r\n\r\n/**\r\n * Performs a case-insensitive string comparison for sorting.\r\n * @param a - The first string to compare.\r\n * @param b - The second string to compare.\r\n * @returns -1 if a < b, 1 if a > b, and 0 if they are equal.\r\n */\r\nfunction stringCompare(a: string, b: string): number {\r\n  const al = a.toLowerCase();\r\n  const bl = b.toLowerCase();\r\n  if (al < bl) return -1;\r\n  if (al > bl) return 1;\r\n  return 0;\r\n}\r\n", "/**\n * Generates an error message when a value is not a complex object.\n * \n * @param guardName - The name of the variable being guarded.\n * @returns A formatted error message.\n */\nexport const notComplexObjectMessage = (guardName: string): string => (\n  `'${guardName}' must be a complex object`\n)\n\n/**\n * Throws an error if the provided value is not a complex object.\n * \n * A complex object is defined as a non-null object that is not a primitive and whose constructor is `Object`.\n * \n * @param guardName - The name of the variable being guarded.\n * @param guard - The value to check.\n * @throws {Error} Throws an error if `isComplexObject(guard)` is false.\n */\nexport const throwNotComplexObject = (guardName: string, guard: any): void => {\n  if (isComplexObject(guard) === false) {\n    throw new Error(notComplexObjectMessage(guardName));\n  }\n}\n\n/**\n * Determines if a value is a complex object.\n * \n * @param value - The value to test.\n * @returns `true` if the value is a defined, non-null object with a constructor matching `Object`.\n */\nexport const isComplexObject = (value: any): boolean => {\n  const isDefined = value !== undefined && value !== null;\n  return isDefined\n    && value.constructor\n    && value.constructor === Object;\n}", "/**\n * Generates an error message when a string is empty.\n * \n * @param guardName - The name of the variable being guarded.\n * @returns A formatted error message.\n */\nexport const emptyMessage = (guardName: string): string => `${guardName} is empty`;\n\n/**\n * Throws an error if the provided string is empty ('').\n * \n * @param guardName - The name of the variable being guarded.\n * @param guard - The string to check for emptiness.\n * @throws {Error} Throws an error if `guard` is an empty string.\n */\nexport const throwEmpty = (guardName: string, guard: string): void => {\n  const isEmpty = guard === '';\n  if (isEmpty) throw new Error(emptyMessage(guardName));\n}", "/**\n * Generates an error message when a value is null.\n * \n * @param guardName - The name of the variable being guarded.\n * @returns A formatted error message.\n */\nexport const nullMessage = (guardName: string): string => `${guardName} is null`;\n\n/**\n * Throws an error if the provided value is null.\n * \n * @param guardName - The name of the variable being guarded.\n * @param guard - The value to check for null.\n * @throws {Error} Throws an error if `guard` is strictly equal to `null`.\n */\nexport const throwNull = (guardName: string, guard: any): void => {\n  const isNull = guard !== null;\n  if (isNull === false) {\n    throw new Error(nullMessage(guardName));\n  }\n}", "/**\n * Supported JavaScript types for type guarding.\n */\nexport type Types = \"number\" | \"string\" | \"boolean\" | \"undefined\" | \"function\" | \"object\" | \"bigint\" | \"symbol\";\n\n\n/**\n * Generates a standard error message when a value is not of the expected type.\n * \n * @param guardName - The name of the variable being guarded.\n * @param guardType - The expected type.\n * @returns A formatted error message.\n */\nexport const notTypeMessage = (guardName: string, guardType: Types): string => (\n  `'${guardName}' must be a type of '${guardType}'`\n)\n\n/**\n * Throws an error if the provided value is not of the specified type.\n * \n * @param guardName - The name of the variable being guarded.\n * @param guard - The value to check.\n * @param guardType - The expected type.\n * @throws {Error} Throws an error if `typeof guard` does not equal `guardType`.\n */\nexport const throwNotType = (guardName: string, guard: any, guardType: Types): void => {\n  const isType = typeof guard === guardType;\n  if (isType === false) {\n    throw new Error(notTypeMessage(guardName, guardType));\n  }\n}", "/**\n * Generates an error message when a value is undefined.\n * \n * @param guardName - The name of the variable being guarded.\n * @returns A formatted error message.\n */\nexport const undefinedMessage = (guardName: string): string => `${guardName} is not defined`;\n\n/**\n * Throws an error if the provided value is undefined.\n * \n * @param guardName - The name of the variable being guarded.\n * @param guard - The value to check for undefined.\n * @throws {Error} Throws an error if `guard` is strictly equal to `undefined`.\n */\nexport const throwUndefined = (guardName: string, guard: any): void => {\n  const isDefined = guard !== undefined;\n  if (isDefined === false) {\n    throw new Error(undefinedMessage(guardName));\n  }\n}", "import { isComplexObject } from \"./guardComplexObject.js\";\nimport { throwEmpty } from \"./guardEmpty.js\";\nimport { ClassInstance } from \"./guardInstance.js\";\nimport { throwNull } from \"./guardNull.js\";\nimport { throwNotType } from \"./guardType.js\";\nimport { throwUndefined } from \"./guardUndefined.js\";\n\n/**\n * Throws an error if the provided value is undefined or null.\n * \n * @param guardName - The name of the variable being guarded.\n * @param guard - The value to check.\n * @throws {Error} Throws an error if `guard` is `undefined` or `null`.\n */\nexport const throwUndefinedOrNull = (guardName: string, guard: any): void => {\n  throwUndefined(guardName, guard);\n  throwNull(guardName, guard);\n}\n\n/**\n * Throws an error if the provided value is not a string or is an empty string.\n * \n * @param guardName - The name of the variable being guarded.\n * @param guard - The value to check.\n * @throws {Error} Throws an error if `guard` is not a string or if it's empty ('').\n */\nexport const throwNotStringOrEmpty = (guardName: string, guard: any): void => {\n  throwNotType(guardName, guard, 'string')\n  throwEmpty(guardName, guard);\n}\n\n/**\n * Generates an error message when a value is not an instance of the specified class or a complex object.\n * \n * @param guardName - The name of the variable being guarded.\n * @param guardType - The expected class constructor.\n * @returns A formatted error message.\n */\nexport const notInstanceOrObjectMessage = (guardName: string, guardType: ClassInstance): string => (\n  `'${guardName}' must be an instance of '${guardType.name}' or a complex object`\n)\n\n/**\n * Throws an error if the provided value is not an instance of the specified class or a complex object.\n * \n * @param guardName - The name of the variable being guarded.\n * @param guard - The value to check.\n * @param guardType - The expected class constructor.\n * @throws {Error} Throws an error if `guard` is not a complex object and not an instance of `guardType`.\n */\nexport const throwNotInstanceOrObject = (guardName: string, guard: any, guardType: ClassInstance): void => {\n  if (isComplexObject(guard)) return;\n  const isInstance = guard instanceof guardType;\n  if (isInstance === false) {\n    throw new Error(notInstanceOrObjectMessage(guardName, guardType));\n  }\n}\n", "/**\n * Represents a class constructor type.\n */\nexport type ClassInstance = new (...args: any[]) => void\n\n/**\n * Generates an error message when a value is not an instance of the specified class.\n * \n * @param guardName - The name of the variable being guarded.\n * @param guardType - The expected class constructor.\n * @returns A formatted error message.\n */\nexport const notInstanceMessage = (guardName: string, guardType: ClassInstance): string => (\n  `'${guardName}' must be an instance of '${guardType.name}'`\n)\n\n/**\n * Throws an error if the provided value is not an instance of the specified class.\n * \n * @param guardName - The name of the variable being guarded.\n * @param guard - The value to check.\n * @param guardType - The expected class constructor.\n * @throws {Error} Throws an error if `guard instanceof guardType` is false.\n */\nexport const throwNotInstance = (guardName: string, guard: any, guardType: ClassInstance): void => {\n  const isInstance = guard instanceof guardType;\n  if (isInstance === false) {\n    throw new Error(notInstanceMessage(guardName, guardType));\n  }\n}\n\n/**\n * Generates an error message when a value is not an instance of any of the specified classes.\n * \n * @param guardInstance - The value that failed the check.\n * @param guardTypes - The expected class constructors.\n * @returns A formatted error message.\n */\nexport const notAnyInstanceMessage = (guardInstance: any, ...guardTypes: ClassInstance[]): string => {\n  const typeNames = guardTypes.map(t => t.name).join('|');\n  return `'${guardInstance.constructor.name}' must be an instance of either '${typeNames}'`\n}\n\n/**\n * Throws an error if the provided value is not an instance of any of the specified classes.\n * \n * @param guardInstance - The value to check.\n * @param guardTypes - One or more expected class constructors.\n * @throws {Error} Throws an error if `guardInstance` is not an instance of any of the `guardTypes`.\n */\nexport const throwNotAnyInstance = (guardInstance: any, ...guardTypes: ClassInstance[]): void => {\n  for (let i = 0; i < guardTypes.length; i++) {\n    const isInstance = guardInstance instanceof guardTypes[i];\n    if (isInstance) return;\n  }\n  throw new Error(notAnyInstanceMessage(guardInstance, ...guardTypes));\n}", "/**\n * Generates an error message when a value is not a key of the provided record.\n * \n * @param guardName - The name of the variable being guarded.\n * @param guard - The record containing valid keys.\n * @returns A formatted error message.\n */\nexport const notObjectKeyMessage = (guardName: string, guard: Record<any, any>): string => (\n  `'${guardName}' must be one of '${Object.keys(guard).join(', ')}'`\n)\n\n/**\n * Throws an error if the provided key is not present in the given record.\n * \n * @param guardName - The name of the variable being guarded.\n * @param guard - The record to check against.\n * @param guardObjectKey - The key to check for existence in the record.\n * @throws {Error} Throws an error if `Object.hasOwn(guard, guardObjectKey)` is false.\n */\nexport const throwNotObjectKey = (guardName: string, guard: Record<any, any>, guardObjectKey: string): void => {\n  const hasKey = Object.hasOwn(guard, guardObjectKey);\n  if (hasKey === false) {\n    throw new Error(notObjectKeyMessage(guardName, guard));\n  }\n}", "import { keywords } from \"../keywords.js\";\r\nimport { TestParserOptions } from \"../../options/testParserOptions.js\";\r\n\r\n/**\r\n * Generates a test title by replacing placeholders with test case values.\r\n * - `$i`: Replaced with the 1-based index of the test case.\r\n * - `$1`, `$2`, etc.: Replaced with the value of the corresponding argument.\r\n * \r\n * @param title - The template title.\r\n * @param testCases - The list of arguments for each test case.\r\n * @param caseIndex - The index of the current test case.\r\n * @returns The generated test title.\r\n */\r\nexport function simpleReplace(title: string, testCases: any[], caseIndex: number): string {\r\n  let newTitle = title.replaceAll(\"$i\", (caseIndex + 1).toString());\r\n  testCases.forEach(\r\n    (arg, index) => {\r\n      newTitle = newTitle.replaceAll(`$${index + 1}`, `${arg}`)\r\n    }\r\n  );\r\n  return newTitle;\r\n}\r\n\r\n/**\r\n * Checks if a function has associated test cases defined via property or metadata.\r\n * \r\n * @param value - The function to check.\r\n * @param options - Parser options used to check for literal 'testCases' properties.\r\n * @returns True if the function has test cases.\r\n */\r\nexport function hasPureFunctionCases(value: any, options: TestParserOptions): boolean {\r\n  return Object.hasOwn(value, keywords.cases)\r\n    || (options.parserFlags!.allowLiteralCases && Object.hasOwn(value, \"testCases\"));\r\n}\r\n\r\n/**\r\n * Extracts test cases from a function that uses an array-based test case definition.\r\n * \r\n * @param value - The function-with-cases array.\r\n * @returns An array of test case arguments.\r\n */\r\nexport function getFunctionTestCases(value: any[]): any[][] {\r\n  const testCases = value.slice(0, value.length - 1);\r\n  return mapTestCases(testCases);\r\n}\r\n\r\n/**\r\n * Extracts test cases from a function's metadata or literal property.\r\n * \r\n * @param value - The function to extract cases from.\r\n * @param options - Parser options.\r\n * @returns An array of test case arguments.\r\n */\r\nexport function getPureFunctionCases(value: any, options: TestParserOptions): any[][] {\r\n  const testCases = value[keywords.cases]\r\n    || (options.parserFlags!.allowLiteralCases && value[\"testCases\"]);\r\n\r\n  return mapTestCases(testCases);\r\n}\r\n\r\n/**\r\n * Normalizes test cases into an array of argument arrays.\r\n * \r\n * @param testCases - Raw test case data.\r\n * @returns A normalized array of argument arrays.\r\n */\r\nexport function mapTestCases(testCases: any[]): any[][] {\r\n  return testCases.map(x => {\r\n    // check if we have an array already\r\n    if (x instanceof Array) return x;\r\n\r\n    // return single cases as an array\r\n    return [x];\r\n  });\r\n}\r\n", "import { throwNotComplexObject, throwNotType } from '@esm-test/guards';\r\n\r\nconst defaultParserFlags = {\r\n  allowLiteralOnly: true,\r\n  allowLiteralTitle: true,\r\n  allowLiteralCases: true\r\n};\r\n\r\n/**\r\n * Flags to enable or disable specific parser behaviors for identifying test metadata.\r\n */\r\nexport class TestParserFlags {\r\n  /**\r\n   * Whether to allow 'only' to be specified as a literal property (e.g., `test.only = true`).\r\n   */\r\n  allowLiteralOnly: boolean = true;\r\n\r\n  /**\r\n   * Whether to allow 'title' to be specified as a literal property (e.g., `test.title = '...'`).\r\n   */\r\n  allowLiteralTitle: boolean = true;\r\n\r\n  /**\r\n   * Whether to allow 'cases' to be specified as a literal property (e.g., `test.cases = [...]`).\r\n   */\r\n  allowLiteralCases: boolean = true;\r\n\r\n  /**\r\n   * Initializes a new TestParserFlags instance.\r\n   * @param parserFlags - Partial flags to override defaults.\r\n   */\r\n  constructor (parserFlags: Partial<TestParserFlags> | any) {\r\n    throwNotComplexObject(\"parserFlags\", parserFlags)\r\n\r\n    Object.assign(this, defaultParserFlags, parserFlags);\r\n\r\n    throwNotType(\"allowLiteralOnly\", this.allowLiteralOnly, \"boolean\");\r\n    throwNotType(\"allowLiteralTitle\", this.allowLiteralTitle, \"boolean\");\r\n    throwNotType(\"allowLiteralCases\", this.allowLiteralCases, \"boolean\");\r\n  }\r\n\r\n}\r\n", "import {\r\n  throwNotInstance,\r\n  throwNotInstanceOrObject,\r\n  throwNotObjectKey,\r\n  throwNotType\r\n} from '@esm-test/guards';\r\nimport { SortByEnum } from '../parser/models/testCollection.js';\r\nimport { simpleReplace } from '../parser/utils/testCaseUtils.js';\r\nimport { TestParserFlags } from './testParserFlags.js';\r\n\r\n/**\r\n * A function to look up context for a given test group.\r\n * @param groupName - The name of the test group.\r\n * @returns The context object for the group, or undefined if not found.\r\n */\r\nexport type ContextLookUp = (groupName: string) => any | undefined;\r\n\r\nconst defaultOptions = {\r\n  builtInFunctions: [\r\n    'beforeAll',\r\n    'beforeEach',\r\n    'afterAll',\r\n    'afterEach'\r\n  ],\r\n  classContextPropertyName: 'suiteContext',\r\n  testContextLookup: (groupName: string) => { },\r\n  testCaseTitleTemplate: simpleReplace,\r\n  parserFlags: new TestParserFlags({}),\r\n  sort: SortByEnum.none\r\n}\r\n\r\n/**\r\n * Configuration options for the test parser.\r\n */\r\nexport class TestParserOptions {\r\n  /**\r\n   * Names of functions to be treated as built-in hooks (e.g., 'beforeEach').\r\n   */\r\n  builtInFunctions: string[] = [];\r\n\r\n  /**\r\n   * The name of the property on a class instance that contains the suite context.\r\n   */\r\n  classContextPropertyName?: string;\r\n\r\n  /**\r\n   * A function to look up context for a given test group.\r\n   */\r\n  testContextLookup: ContextLookUp = (groupName) => { };\r\n\r\n  /**\r\n   * A template function to generate titles for parameterized test cases.\r\n   */\r\n  testCaseTitleTemplate: (title: string, testCases: any[], caseIndex: number) => string = simpleReplace;\r\n\r\n  /**\r\n   * Flags to enable or disable specific parser behaviors.\r\n   */\r\n  parserFlags?: TestParserFlags;\r\n\r\n  /**\r\n   * The sorting method to apply to the extracted tests.\r\n   */\r\n  sort: SortByEnum = SortByEnum.none;\r\n\r\n  /**\r\n   * Initializes a new TestParserOptions instance.\r\n   * @param options - Partial configuration to override defaults.\r\n   */\r\n  constructor(options: Partial<TestParserOptions>) {\r\n    throwNotInstanceOrObject(\"options\", options, TestParserOptions);\r\n\r\n    Object.assign(this, defaultOptions, options);\r\n\r\n    throwNotInstance(\"builtInFunctions\", this.builtInFunctions, Array);\r\n    throwNotType(\r\n      \"classContextPropertyName\",\r\n      this.classContextPropertyName,\r\n      \"string\"\r\n    );\r\n    throwNotInstance(\"testContextLookup\", this.testContextLookup, Function);\r\n    throwNotInstance(\"testCaseTitleTemplate\", this.testCaseTitleTemplate, Function);\r\n    throwNotInstance(\"parserFlags\", this.parserFlags, TestParserFlags);\r\n    throwNotObjectKey(\"sort\", SortByEnum, this.sort);\r\n  }\r\n\r\n}\r\n", "import { throwNotType, throwNull, throwUndefined } from '@esm-test/guards';\r\nimport { keywords } from '../keywords.js';\r\n\r\n/**\r\n * Represents a field extracted from a module or object.\r\n */\r\nexport class ObjectField {\r\n  /** The group name the field belongs to. */\r\n  groupName: string;\r\n  /** The name of the field (property name). */\r\n  name: string;\r\n  /** The value of the field. */\r\n  value: any;\r\n\r\n  /**\r\n   * Initializes a new ObjectField instance.\r\n   * @param groupName - Parent group name.\r\n   * @param name - Property name.\r\n   * @param value - Property value.\r\n   */\r\n  constructor(groupName: string, name: string, value: any) {\r\n    throwNotType(\"groupName\", groupName, \"string\");\r\n    throwNotType(\"name\", name, \"string\");\r\n\r\n    throwUndefined(\"value\", value);\r\n    throwNull(\"value\", value);\r\n\r\n    this.groupName = groupName;\r\n    this.name = name;\r\n    this.value = value;\r\n  }\r\n\r\n  /** Whether this field represents the default export of a module. */\r\n  get isDefaultExport(): boolean {\r\n    return this.name == keywords.defaultExport;\r\n  }\r\n\r\n  /** Whether the field's value is a function. */\r\n  get isFunction(): boolean {\r\n    return this.value instanceof Function;\r\n  }\r\n\r\n  /** Whether the field's value is an array where the last element is a function (indicating test cases). */\r\n  get isFunctionWithCases(): boolean {\r\n    const value = this.value;\r\n    return value instanceof Array\r\n      && value.length > 0\r\n      && value[value.length - 1] instanceof Function;\r\n  }\r\n\r\n  /** Whether the field's value has the 'cases' metadata attached (via decorator). */\r\n  get hasCasesDecorator(): boolean {\r\n    return this.value[keywords.cases] instanceof Array;\r\n  }\r\n\r\n}\r\n", "import { TestModule } from '#src/extractTestsFromModule';\r\nimport { ObjectField } from './models/objectField.js';\r\n\r\n/**\r\n * Extracts all properties from a module or object and wraps them in `ObjectField` instances.\r\n * \r\n * @param groupName - The parent group name for the extracted fields.\r\n * @param moduleToParse - The object or module to extract fields from.\r\n * @returns An array of `ObjectField` representing the properties of the object.\r\n */\r\nexport function parseObjectFields(groupName: string, moduleToParse: TestModule): ObjectField[] {\r\n  const fields: ObjectField[] = [];\r\n  fields.push(\r\n    ...Object.keys(moduleToParse)\r\n      .map(name => new ObjectField(groupName, name, moduleToParse[name])\r\n      )\r\n  );\r\n\r\n  return fields;\r\n}\r\n", "import { throwNull, throwUndefined } from '@esm-test/guards';\r\nimport { ObjectField } from './objectField.js';\r\n\r\n/**\r\n * Represents a field extracted from a class instance.\r\n */\r\nexport class ClassInstanceField extends ObjectField {\r\n  /** The parent class instance the field belongs to. */\r\n  classInstance: object;\r\n\r\n  /**\r\n   * Initializes a new ClassInstanceField instance.\r\n   * @param groupName - Parent group name.\r\n   * @param name - Property/method name.\r\n   * @param value - Property/method value.\r\n   * @param classInstance - The parent instance.\r\n   */\r\n  constructor (groupName: string, name: string, value: any, classInstance: object) {\r\n    super(groupName, name, value)\r\n\r\n    throwUndefined(\"classInstance\", classInstance);\r\n    throwNull(\"classInstance\", classInstance);\r\n\r\n    this.classInstance = classInstance;\r\n  }\r\n\r\n}\r\n", "import { keywords } from '../parser/keywords.js';\r\nimport { ClassInstanceField } from './models/classInstanceField.js';\r\n\r\nconst ignoreClassInstFields = [\r\n  \"length\",\r\n  \"prototype\",\r\n  \"name\",\r\n  keywords.title,\r\n  keywords.only\r\n];\r\n\r\n/**\r\n * Extracts methods and properties from a class prototype and wraps them in `ClassInstanceField` instances.\r\n * This function traverses the inheritance chain to collect all inherited members.\r\n * \r\n * @param groupName - The parent group name.\r\n * @param classInstance - The instance of the class to parse.\r\n * @returns An array of `ClassInstanceField` instances representing the class's members.\r\n */\r\nexport function parserClassInstFields(groupName: string, classInstance: any): ClassInstanceField[] {\r\n  // get the class prototype\r\n  const classProto = Reflect.getPrototypeOf(classInstance);\r\n\r\n  // extract the class fields\r\n  const fields = forEachClassProto(classProto)\r\n    .filter(x => ignoreClassInstFields.includes(x as string) === false)\r\n    .map(\r\n      name => new ClassInstanceField(\r\n        groupName,\r\n        name as string,\r\n        classProto![name as keyof typeof classProto],\r\n        classInstance\r\n      )\r\n    );\r\n\r\n  return fields;\r\n}\r\n\r\n/**\r\n * Traverses the class prototype chain to extract all property and method names.\r\n * \r\n * @param classProto - The prototype of the class instance.\r\n * @returns An array of all inherited property and method keys.\r\n */\r\nfunction forEachClassProto(classProto: object | null): Array<string | symbol> {\r\n  const keys: Array<string | symbol> = [];\r\n  const ignoreProtoFields = (x: string | symbol) => x !== 'constructor' && keys.indexOf(x) === -1;\r\n\r\n  // iterate all class prototype fields (including class extended prototype fields)\r\n  while (classProto && classProto !== Object.prototype) {\r\n    keys.push(\r\n      ...Reflect.ownKeys(classProto).filter(ignoreProtoFields)\r\n    );\r\n    classProto = Reflect.getPrototypeOf(classProto);\r\n  }\r\n\r\n  return keys;\r\n}\r\n", "import { throwNotInstance } from '@esm-test/guards';\r\nimport { TestCollection } from '../../parser/models/testCollection.js';\r\nimport { TestParserOptions } from '../../options/testParserOptions.js';\r\n\r\n/**\r\n * Contextual information used during the pre-processing phase of test extraction.\r\n */\r\nexport class PreProcessContext {\r\n  /** The collection where discovered tests are being accumulated. */\r\n  tests: TestCollection;\r\n  /** The configuration options for the parser. */\r\n  options: TestParserOptions;\r\n\r\n  /**\r\n   * Initializes a new PreProcessContext.\r\n   * @param tests - The test collection to populate.\r\n   * @param options - Parser options.\r\n   */\r\n  constructor(tests: TestCollection, options: TestParserOptions) {\r\n    throwNotInstance(\"tests\", tests, TestCollection);\r\n    throwNotInstance(\"options\", options, TestParserOptions);\r\n\r\n    this.tests = tests;\r\n    this.options = options;\r\n  }\r\n\r\n  /**\r\n   * Determines if a property name matches one of the configured built-in test runner functions.\r\n   * \r\n   * @param name - The property name.\r\n   * @returns True if it's a built-in function.\r\n   */\r\n  isBuiltInFunction(name: string): boolean {\r\n    return this.options.builtInFunctions.includes(name);\r\n  }\r\n\r\n}\r\n", "export * from './processClassDef.js';\r\nexport * from './processClassInstance.js';\r\nexport * from './processClassInstFunction.js';\r\nexport * from './processDefaultExport.js';\r\nexport * from './processFunction.js';\r\nexport * from './processFunctionWithCasesArray.js';\r\nexport * from './processModule.js';\r\nexport * from './processObject.js';\r\nexport * from './processOnlyField.js';", "/**\r\n * Checks if the given value is a class definition (constructor).\r\n * @param value - The value to check.\r\n * @returns True if the value is a class definition.\r\n */\r\nexport function isClassDefinition(value: any): boolean {\r\n  return value.prototype !== undefined &&\r\n    value.prototype.constructor !== undefined &&\r\n    value.prototype.constructor.toString().startsWith(\"class\");\r\n}\r\n\r\n/**\r\n * Checks if the given value is an instance of a class.\r\n * @param value - The value to check.\r\n * @returns True if the value is a class instance.\r\n */\r\nexport function isClassInstance(value: any): boolean {\r\n  const proto = Object.getPrototypeOf(value);\r\n  return proto.constructor\r\n    && proto.constructor.toString().startsWith(\"class\");\r\n}\r\n", "import { TestParserOptions } from \"../../options/testParserOptions.js\";\r\nimport { keywords } from \"../keywords.js\";\r\n\r\n/**\r\n * Checks if a value has a custom title (via metadata or literal property).\r\n * \r\n * @param value - The object or function to check.\r\n * @param options - Parser options.\r\n * @returns True if the value has a title defined.\r\n */\r\nexport function hasTitle(value: any, options: TestParserOptions): boolean {\r\n  return Object.hasOwn(value, keywords.title)\r\n    || (options.parserFlags!.allowLiteralTitle && Object.hasOwn(value, \"title\"))\r\n}\r\n\r\n/**\r\n * Retrieves the custom title from a value.\r\n * \r\n * @param value - The object or function.\r\n * @param options - Parser options.\r\n * @returns The title string or boolean.\r\n */\r\nexport function getTitle(value: any, options: TestParserOptions): string | boolean {\r\n  return value[keywords.title]\r\n    || (options.parserFlags!.allowLiteralTitle && value[\"title\"]);\r\n}\r\n\r\n/**\r\n * Checks if a value has a title defined specifically via a decorator.\r\n * \r\n * @param value - The object or function.\r\n * @returns True if a title string is present in the keywords property.\r\n */\r\nexport function hasTitleDecorator(value: any): boolean {\r\n  return typeof value[keywords.title] === 'string';\r\n}\r\n", "import { keywords } from '../../parser/keywords.js';\r\nimport { Test, TestType, ObjectField } from '../../parser/models/all.js';\r\nimport { isClassDefinition } from \"../../parser/utils/classUtils.js\";\r\nimport { hasOnlyDecorator } from '../../parser/utils/testOnlyUtils.js';\r\nimport { hasTitleDecorator } from '../../parser/utils/testTitleUtils.js';\r\nimport { PreProcessContext } from '../models/preProcessContext.js';\r\nimport { getChildGroupName, getClassInstanceChildren } from './preProcessUtils.js';\r\n\r\n/**\r\n * Processor for identifying and creating tests from class definitions.\r\n * It handles class decorators (only, title), default exports, and recurses into class members.\r\n * \r\n * @param field - The object field containing the class definition.\r\n * @param index - Field index in the collection.\r\n * @param context - The pre-processing context.\r\n * @returns True if the field was processed as a class definition.\r\n */\r\nexport function processClassDef(field: ObjectField, index: number, context: PreProcessContext): boolean {\r\n  const { name, value } = field;\r\n\r\n  // class definition flags\r\n  if (isClassDefinition(value)) {\r\n    const isClassDefWithOnly = hasOnlyDecorator(field.value);\r\n    const isClassDefWithTitle = hasTitleDecorator(field.value);\r\n    const isDefaultExport = field.isDefaultExport;\r\n\r\n    let type = TestType.CLASS_DEF;\r\n    type |= isDefaultExport ? TestType.EXPORT_DEFAULT : 0;\r\n    type |= isClassDefWithOnly ? TestType.CLASS_DEF_WITH_ONLY : 0;\r\n    type |= isClassDefWithTitle ? TestType.CLASS_DEF_WITH_TITLE : 0;\r\n\r\n    const nameOrTitle = isClassDefWithTitle\r\n      ? value[keywords.title]\r\n      : name;\r\n\r\n    // avoid default entries\r\n    if (isDefaultExport === false) {\r\n      context.tests.push(\r\n        new Test(\r\n          field.groupName,\r\n          nameOrTitle,\r\n          value,\r\n          new TestType(type),\r\n          // test cases\r\n          [],\r\n          // only expression\r\n          \"\"\r\n        )\r\n      );\r\n    }\r\n\r\n    // generate the child group name\r\n    let childGroupName = isDefaultExport && isClassDefWithTitle === false\r\n      ? field.groupName\r\n      : getChildGroupName(field.groupName, nameOrTitle);\r\n\r\n    // process new class instance\r\n    const classInstance = new value();\r\n    const testProps = getClassInstanceChildren(\r\n      childGroupName,\r\n      classInstance,\r\n      context.options\r\n    );\r\n\r\n    context.tests.push(\r\n      ...testProps\r\n    );\r\n\r\n    return true;\r\n  }\r\n\r\n  return false;\r\n}\r\n", "import { Test, TestType } from '../../parser/models/all.js';\r\nimport { ClassInstanceField } from '../../parser/models/classInstanceField.js';\r\nimport { isClassInstance } from '../../parser/utils/classUtils.js';\r\nimport { PreProcessContext } from '../models/preProcessContext.js';\r\nimport { getChildGroupName, getClassInstanceChildren } from './preProcessUtils.js';\r\n\r\n/**\r\n * Processor for identifying and creating tests from existing class instances.\r\n * \r\n * @param field - The field containing the class instance.\r\n * @param index - Field index in the collection.\r\n * @param context - The pre-processing context.\r\n * @returns True if the field was processed as a class instance.\r\n */\r\nexport function processClassInstance(field: ClassInstanceField, index: number, context: PreProcessContext): boolean {\r\n  const { name, value } = field;\r\n\r\n  if (isClassInstance(value)) {\r\n\r\n    context.tests.push(\r\n      new Test(\r\n        field.groupName,\r\n        name,\r\n        value,\r\n        new TestType(TestType.CLASS_INST),\r\n        // test cases\r\n        [],\r\n        // only expression\r\n        \"\"\r\n      )\r\n    );\r\n\r\n    // process existing class instance\r\n    const testProps = getClassInstanceChildren(\r\n      getChildGroupName(field.groupName, name),\r\n      value,\r\n      context.options\r\n    );\r\n\r\n    context.tests.push(\r\n      ...testProps\r\n    );\r\n\r\n    return true;\r\n  }\r\n\r\n  return false;\r\n}\r\n", "import { keywords } from '../../parser/keywords.js';\r\nimport { ClassInstanceField, Test, TestType } from '../../parser/models/all.js';\r\nimport { hasOnlyDecorator } from '../../parser/utils/testOnlyUtils.js';\r\nimport { hasTitleDecorator } from '../../parser/utils/testTitleUtils.js';\r\nimport { PreProcessContext } from '../models/preProcessContext.js';\r\n\r\n/**\r\n * Processor for identifying and creating tests from class instance methods.\r\n * It handles method decorators (only, title, cases) and distinguishes built-in hooks.\r\n * \r\n * @param field - The class instance field containing the method.\r\n * @param index - Field index in the collection.\r\n * @param context - The pre-processing context.\r\n * @returns True if the field was processed as a class instance method.\r\n */\r\nexport function processClassInstFunction(field: ClassInstanceField, index: number, context: PreProcessContext): boolean {\r\n  const { name, value } = field;\r\n\r\n  if (field instanceof ClassInstanceField && field.isFunction) {\r\n    const isClassInstBuiltInFunction = context.isBuiltInFunction(name);\r\n\r\n    const isClassInstFunctionWithOnly = isClassInstBuiltInFunction === false\r\n      && hasOnlyDecorator(field.value);\r\n\r\n    const isClassInstFunctionWithCases = isClassInstBuiltInFunction === false\r\n      && field.hasCasesDecorator;\r\n\r\n    const isClassInstFunctionWithTitle = hasTitleDecorator(field.value);\r\n\r\n    const onlyExpression = isClassInstFunctionWithOnly\r\n      ? value[keywords.only]\r\n      : \"\"\r\n\r\n    const testCases = isClassInstFunctionWithCases\r\n      ? value[keywords.cases].slice().reverse()\r\n      : [];\r\n\r\n    let type = TestType.CLASS_INST_FUNCTION;\r\n    type |= isClassInstBuiltInFunction ? TestType.BUILTIN_FUNCTION : 0;\r\n    type |= isClassInstFunctionWithOnly ? TestType.FUNCTION_WITH_ONLY : 0;\r\n    type |= isClassInstFunctionWithCases ? TestType.FUNCTION_WITH_CASES : 0;\r\n    type |= isClassInstFunctionWithTitle ? TestType.FUNCTION_WITH_TITLE : 0;\r\n\r\n    context.tests.push(\r\n      new Test(\r\n        field.groupName,\r\n        // name or title\r\n        isClassInstFunctionWithTitle\r\n          ? value[keywords.title]\r\n          : name,\r\n        // value\r\n        value.bind(field.classInstance),\r\n        // type\r\n        new TestType(type),\r\n        // test cases\r\n        testCases,\r\n        // only expression\r\n        onlyExpression\r\n      )\r\n    );\r\n\r\n    return true;\r\n  }\r\n\r\n  return false;\r\n}\r\n", "import { isClassDefinition } from '../../parser/utils/classUtils.js';\r\nimport { ObjectField } from '../../parser/models/objectField.js';\r\nimport { PreProcessContext } from '../models/preProcessContext.js';\r\nimport { processChildObjectFields } from './preProcessUtils.js';\r\nimport { processClassDef } from './processClassDef.js';\r\n\r\n/**\r\n * Processor for handling default exports. It can delegate to class definition processing\r\n * or recurse into object properties.\r\n * \r\n * @param field - The object field containing the default export.\r\n * @param index - Field index in the collection.\r\n * @param context - The pre-processing context.\r\n * @returns True if the field was processed as a default export.\r\n */\r\nexport function processDefaultExport(field: ObjectField, index: number, context: PreProcessContext): boolean {\r\n  const isDefaultExport = field.isDefaultExport;\r\n\r\n  if (isDefaultExport) {\r\n\r\n    const { name, value } = field;\r\n\r\n    if (isClassDefinition(value)) {\r\n      return processClassDef(\r\n        new ObjectField(field.groupName, name, value),\r\n        index,\r\n        context\r\n      );\r\n    }\r\n\r\n    // process children\r\n    const testProps = processChildObjectFields(\r\n      field.groupName,\r\n      value,\r\n      context.options\r\n    );\r\n\r\n    context.tests.push(\r\n      ...testProps\r\n    );\r\n\r\n    return true;\r\n  }\r\n\r\n  return false;\r\n}\r\n", "import { TestParserOptions } from '../../options/testParserOptions.js';\r\nimport { ObjectField, Test, TestType } from '../../parser/models/all.js';\r\nimport {\r\n  getPureFunctionCases,\r\n  hasPureFunctionCases\r\n} from '../../parser/utils/testCaseUtils.js';\r\nimport { hasOnly } from '../../parser/utils/testOnlyUtils.js';\r\nimport { getTitle, hasTitle } from '../../parser/utils/testTitleUtils.js';\r\nimport { PreProcessContext } from '../models/preProcessContext.js';\r\n\r\n/**\r\n * Processor for identifying and creating `Test` objects from functions.\r\n * It handles standard functions, functions with custom titles, and functions marked with 'only'.\r\n * \r\n * @param field - The object field to process.\r\n * @param index - Field index in the collection.\r\n * @param context - The pre-processing context.\r\n * @returns True if the field was processed as a function test.\r\n */\r\nexport function processFunction(field: ObjectField, index: number, context: PreProcessContext): boolean {\r\n  let { name, value } = field;\r\n\r\n  if (field.isFunction) {\r\n    const options = context.options;\r\n    const isFunctionBuiltIn = context.isBuiltInFunction(name);\r\n    const isPureFunctionWithOnly = hasOnly(value, options);\r\n    const isPureFunctionWithTitle = hasTitle(value, options);\r\n    const isPureFunctionWithCases = hasPureFunctionCases(value, options);\r\n\r\n    let type = TestType.FUNCTION\r\n    type |= isFunctionBuiltIn ? TestType.BUILTIN : 0;\r\n    type |= isPureFunctionWithTitle ? TestType.FUNCTION_WITH_TITLE : 0;\r\n    type |= isPureFunctionWithOnly ? TestType.FUNCTION_WITH_ONLY : 0;\r\n    type |= isPureFunctionWithCases ? TestType.FUNCTION_WITH_CASES : 0;\r\n\r\n    const testCases = isPureFunctionWithCases\r\n      ? getPureFunctionCases(value, options)\r\n      : [];\r\n\r\n    const boundFn = isPureFunctionWithCases\r\n      ? value\r\n      : getTestValueAsFunction(\r\n        field.groupName,\r\n        value,\r\n        options\r\n      );\r\n\r\n    context.tests.push(\r\n      new Test(\r\n        field.groupName,\r\n        // name\r\n        isPureFunctionWithTitle\r\n          ? getTitle(value, options) as string\r\n          : name,\r\n        // value\r\n        boundFn,\r\n        new TestType(type),\r\n        testCases,\r\n        // only expression\r\n        isPureFunctionWithOnly ? value.only || value[\"__test.only__\"] : \"\"\r\n      )\r\n    );\r\n\r\n    return true;\r\n  }\r\n\r\n  return false;\r\n}\r\n\r\n/**\r\n * Wraps a test function to inject context via `testContextLookup`.\r\n * It preserves the function length to maintain compatibility with test runners that inspect it.\r\n * \r\n * @param groupName - The test group name.\r\n * @param testFn - The original test function.\r\n * @param options - Parser options.\r\n * @returns A wrapped function that applies the group context.\r\n */\r\nfunction getTestValueAsFunction(groupName: string, testFn: Function, options: TestParserOptions): Function {\r\n  // some test runners inspect the test fn length\r\n  // when the length is > 0 they then pass their utility args to the test fn\r\n  // i.e. a done() callback\r\n  if (testFn.length === 0) {\r\n    return function(this: any) {\r\n      const thisArg = options.testContextLookup(groupName);\r\n      return testFn.call(thisArg);\r\n    }\r\n  } else if (testFn.length === 1) {\r\n    // ensures the length of the function is at least 1\r\n    return function(this: any, first: any, ...args: any[]) {\r\n      const thisArg = options.testContextLookup(groupName);\r\n      return testFn.call(thisArg, first, ...args);\r\n    }\r\n  } else {\r\n    // ensures the length of the function is at least 2\r\n    return function(this: any, first: any, second: any, ...args: any[]) {\r\n      const thisArg = options.testContextLookup(groupName);\r\n      return testFn.call(thisArg, first, second, ...args);\r\n    }\r\n  }\r\n}\r\n", "import { ObjectField, Test, TestType } from '../../parser/models/all.js';\r\nimport { getFunctionTestCases } from '../../parser/utils/testCaseUtils.js';\r\nimport { PreProcessContext } from '../models/preProcessContext.js';\r\n\r\n/**\r\n * Processor for identifying tests defined as an array where the last element is the test function.\r\n * This is an alternative way to define parameterized tests without decorators.\r\n * \r\n * @param field - The object field containing the array.\r\n * @param index - Field index in the collection.\r\n * @param context - The pre-processing context.\r\n * @returns True if the field was processed as a function with cases array.\r\n */\r\nexport function processFunctionWithCasesArray(field: ObjectField, index: number, context: PreProcessContext): boolean {\r\n  let { name, value } = field;\r\n\r\n  if (field.isFunctionWithCases) {\r\n    const testCases = getFunctionTestCases(field.value);\r\n\r\n    context.tests.push(\r\n      new Test(\r\n        field.groupName,\r\n        name,\r\n        value[value.length - 1],\r\n        new TestType(TestType.FUNCTION_WITH_CASES),\r\n        testCases,\r\n        // only expression\r\n        \"\"\r\n      )\r\n    );\r\n\r\n    return true;\r\n  }\r\n\r\n  return false;\r\n}\r\n", "import { keywords } from \"../keywords.js\";\r\n\r\n/**\r\n * Checks if the given value is a JavaScript module (ESM).\r\n * Uses the `Symbol.toStringTag` property for identification.\r\n * \r\n * @param value - The value to check.\r\n * @returns True if the value is a module.\r\n */\r\nexport function isModule(value: any): boolean {\r\n  return value[Symbol.toStringTag] === keywords.moduleTag\r\n}\r\n", "import { ObjectField, Test, TestType } from \"../../parser/models/all.js\";\r\nimport { isModule } from \"../../parser/utils/moduleUtils.js\";\r\nimport { getTitle, hasTitle } from \"../../parser/utils/testTitleUtils.js\";\r\nimport { PreProcessContext } from \"../models/preProcessContext.js\";\r\nimport { getChildGroupName, processChildObjectFields } from \"./preProcessUtils.js\";\r\n\r\n/**\r\n * Processor for identifying JavaScript modules (ESM) and extracting tests from their exports.\r\n * \r\n * @param field - The object field containing the module.\r\n * @param index - Field index in the collection.\r\n * @param context - The pre-processing context.\r\n * @returns True if the field was processed as a module.\r\n */\r\nexport function processModule(field: ObjectField, index: number, context: PreProcessContext): boolean {\r\n  const { name, value } = field;\r\n\r\n  if (isModule(value)) {\r\n    const options = context.options;\r\n    const type = TestType.MODULE;\r\n    const isModuleWithTitle = hasTitle(value, options);\r\n\r\n    const nameOrTitle = isModuleWithTitle\r\n      ? getTitle(value, options) as string\r\n      : name;\r\n\r\n    const moduleTestGroup = new Test(\r\n      field.groupName,\r\n      nameOrTitle,\r\n      value,\r\n      new TestType(type),\r\n      // test cases\r\n      [],\r\n      // only expression\r\n      \"\"\r\n    );\r\n\r\n    context.tests.push(moduleTestGroup);\r\n\r\n    // process children\r\n    const testProps = processChildObjectFields(\r\n      getChildGroupName(moduleTestGroup.groupName, nameOrTitle),\r\n      value,\r\n      options\r\n    );\r\n\r\n    context.tests.push(\r\n      ...testProps\r\n    );\r\n\r\n    return true;\r\n  }\r\n\r\n  return false;\r\n}\r\n", "import { ObjectField, Test, TestType } from \"../../parser/models/all.js\";\r\nimport { getTitle, hasTitle } from \"../../parser/utils/testTitleUtils.js\";\r\nimport { PreProcessContext } from \"../models/preProcessContext.js\";\r\nimport { getChildGroupName, processChildObjectFields } from \"./preProcessUtils.js\";\r\n\r\n/**\r\n * Processor for identifying plain objects and recursively extracting tests from their properties.\r\n * \r\n * @param field - The object field containing the object.\r\n * @param index - Field index in the collection.\r\n * @param context - The pre-processing context.\r\n * @returns True if the field was processed as an object group.\r\n */\r\nexport function processObject(field: ObjectField, index: number, context: PreProcessContext): boolean {\r\n  let { name, value } = field;\r\n\r\n  if (value instanceof Object) {\r\n    const options = context.options;\r\n    const isObjectWithTitle = hasTitle(value, options);\r\n\r\n    const nameOrTitle = isObjectWithTitle\r\n      ? getTitle(value, options) as string\r\n      : name;\r\n\r\n    const objectTestProp = new Test(\r\n      field.groupName,\r\n      nameOrTitle,\r\n      value,\r\n      new TestType(TestType.OBJECT),\r\n      // test cases\r\n      [],\r\n      // only expression\r\n      \"\"\r\n    );\r\n\r\n    context.tests.push(objectTestProp);\r\n\r\n    // process children\r\n    const testProps = processChildObjectFields(\r\n      getChildGroupName(objectTestProp.groupName, nameOrTitle),\r\n      value,\r\n      options\r\n    );\r\n\r\n    context.tests.push(\r\n      ...testProps\r\n    );\r\n\r\n    return true;\r\n  }\r\n\r\n  return false;\r\n}\r\n", "import { ObjectField, Test, TestType } from '../../parser/models/all.js';\r\nimport { isOnlyExpressionSupported, isOnlyField } from \"../../parser/utils/testOnlyUtils.js\";\r\nimport { PreProcessContext } from '../models/preProcessContext.js';\r\n\r\n/**\r\n * Processor for identifying literal 'only' fields (e.g., `export const only = true`).\r\n * These fields signal that subsequent tests in the same group should be filtered.\r\n * \r\n * @param field - The object field to check.\r\n * @param index - Field index in the collection.\r\n * @param context - The pre-processing context.\r\n * @returns True if the field was processed as an 'only' literal.\r\n */\r\nexport function processOnlyField(field: ObjectField, index: number, context: PreProcessContext): boolean {\r\n  let { name, value } = field;\r\n\r\n  const options = context.options;\r\n  const isOnly = isOnlyField(name, options) && isOnlyExpressionSupported(value);\r\n  if (isOnly) {\r\n    context.tests.push(\r\n      new Test(\r\n        field.groupName,\r\n        name,\r\n        value,\r\n        new TestType(TestType.OBJECT_WITH_ONLY),\r\n        // test cases\r\n        [],\r\n        // only expression\r\n        value\r\n      )\r\n    );\r\n\r\n    return true;\r\n  }\r\n\r\n  return false;\r\n}\r\n", "import { TestParserOptions } from '../options/testParserOptions.js';\r\nimport { ClassInstanceField, ObjectField, TestCollection } from '../parser/models/all.js';\r\nimport { PreProcessContext } from './models/preProcessContext.js';\r\nimport * as FieldProcessors from './pre/all.js';\r\n\r\n// ordered field processors\r\nconst preProcessorOrder = [\r\n  \"processDefaultExport\",\r\n  \"processModule\",\r\n  \"processClassDef\",\r\n  \"processClassInstance\",\r\n  \"processClassInstFunction\",\r\n  \"processFunction\",\r\n  \"processFunctionWithCasesArray\",\r\n  \"processOnlyField\",\r\n  \"processObject\"\r\n];\r\n\r\n/**\r\n * A function that processes an extracted field to identify and create a test or group.\r\n * @param test - The field to process.\r\n * @param index - The index of the field in the current scope.\r\n * @param context - The pre-processing context.\r\n * @returns True if the processor handled the field and no further processors should run for it.\r\n */\r\nexport type PreProcessor = (\r\n    test: ObjectField | ClassInstanceField, \r\n    index: number, \r\n    context: PreProcessContext\r\n) => boolean;\r\n\r\nconst preProcessors: PreProcessor[] = preProcessorOrder.map(pk => (FieldProcessors as any)[pk]);\r\n\r\n/**\r\n * Executes the pre-processing phase of the test parsing pipeline.\r\n * Iterates through all extracted fields and applies a series of processors to identify tests.\r\n * \r\n * @param fields - The extracted module or class fields.\r\n * @param options - Parser configuration options.\r\n * @returns A {@link TestCollection} containing the initial set of discovered tests.\r\n */\r\nexport function executePreProcessing(fields: (ObjectField | ClassInstanceField)[], options: TestParserOptions): TestCollection {\r\n  const tests = new TestCollection();\r\n\r\n  for (let fieldIndex = 0; fieldIndex < fields.length; fieldIndex++) {\r\n    const field = fields[fieldIndex];\r\n    const preProcessContext = new PreProcessContext(\r\n      tests,\r\n      options\r\n    );\r\n\r\n    for (let index = 0; index < preProcessors.length; index++) {\r\n      const processor = preProcessors[index];\r\n      const testProp = processor(field, fieldIndex, preProcessContext);\r\n      if (testProp === true) {\r\n        break;\r\n      }\r\n    }\r\n  }\r\n\r\n  // prevent unprocessed fields from being included\r\n  return new TestCollection(tests.filter(field => field !== undefined));\r\n}\r\n", "import { TestParserOptions } from \"../../options/testParserOptions.js\";\r\nimport { TestCollection } from \"../../parser/models/testCollection.js\";\r\nimport { parserClassInstFields } from \"../../parser/parseClassInstFields.js\";\r\nimport { parseObjectFields } from \"../../parser/parseObjectFields.js\";\r\nimport { executePreProcessing } from \"../executePreProcessing.js\";\r\n\r\n/**\r\n * Generates a child group name by appending the child name to the parent group name.\r\n * \r\n * @param groupName - The parent group name.\r\n * @param name - The name of the child element.\r\n * @returns The combined child group name.\r\n */\r\nexport const getChildGroupName = (groupName: string, name: string): string => `${groupName}_${name}`;\r\n\r\n/**\r\n * Parses and processes the fields of a child object within a test group.\r\n * \r\n * @param childGroupName - The group name for the child object.\r\n * @param value - The child object to parse.\r\n * @param options - Parser options.\r\n * @returns A collection of tests extracted from the child object.\r\n */\r\nexport function processChildObjectFields(childGroupName: string, value: any, options: TestParserOptions): TestCollection {\r\n  const childFields = parseObjectFields(childGroupName, value);\r\n\r\n  return executePreProcessing(childFields, options);\r\n}\r\n\r\n/**\r\n * Extracts and processes tests from a class instance's members.\r\n * \r\n * @param childGroupName - The group name for the class instance.\r\n * @param classInstance - The instance to extract members from.\r\n * @param options - Parser options.\r\n * @returns A collection of tests extracted from the class instance.\r\n */\r\nexport function getClassInstanceChildren(childGroupName: string, classInstance: any, options: TestParserOptions): TestCollection {\r\n  defineClassContextGetter(childGroupName, classInstance, options);\r\n\r\n  const childFields = parserClassInstFields(childGroupName, classInstance)\r\n\r\n  return executePreProcessing(childFields, options);\r\n}\r\n\r\n/**\r\n * Defines a getter on a class instance that provides access to the group's test context.\r\n * \r\n * @param groupName - The name of the test group.\r\n * @param thisArg - The class instance to define the property on.\r\n * @param options - Parser options containing the context property name and lookup function.\r\n */\r\nexport function defineClassContextGetter(groupName: string, thisArg: any, options: TestParserOptions): void {\r\n  Object.defineProperty(\r\n    thisArg,\r\n    options.classContextPropertyName!,\r\n    {\r\n      configurable: true,\r\n      get: function () {\r\n        return options.testContextLookup(groupName)\r\n      },\r\n    }\r\n  )\r\n}\r\n", "/**\r\n * Represents the type of a test or test-related entity using bitwise flags.\r\n */\r\nexport class TestType {\r\n  /**\r\n   * The numeric value representing the combined bitwise flags.\r\n   */\r\n  value: number;\r\n\r\n  /**\r\n   * Initializes a new TestType.\r\n   * @param type - The numeric bitmask value.\r\n   */\r\n  constructor(type: number) {\r\n    if (typeof type !== 'number') {\r\n      throw new Error(`${TestType.name} must be a number. Instead saw ${type}`);\r\n    }\r\n\r\n    if (type < MIN_FLAG || type > MAX_FLAG) {\r\n      throw new Error(`${TestType.name} value out of range. Instead saw ${type}`);\r\n    }\r\n\r\n    this.value = type;\r\n  }\r\n\r\n  /**\r\n   * Checks if the specified bitmask is included in the current type value.\r\n   * @param testFlag - The bitmask to check for.\r\n   * @returns True if the flag is set.\r\n   */\r\n  has(testFlag: number): boolean {\r\n    return (this.value & testFlag) === testFlag;\r\n  }\r\n\r\n  /**\r\n   * Checks if any of the specified bitmasks are included in the current type value.\r\n   * @param testFlags - The bitmasks to check for.\r\n   * @returns True if at least one flag is set.\r\n   */\r\n  hasEither(...testFlags: number[]): boolean {\r\n    for (let i = 0; i < testFlags.length; i++) {\r\n      if (this.has(testFlags[i])) return true;\r\n    }\r\n    return false;\r\n  }\r\n\r\n  /**\r\n   * Checks if the current type value is exactly equal to the specified bitmask.\r\n   * @param testFlag - The bitmask to compare against.\r\n   * @returns True if the values are equal.\r\n   */\r\n  is(testFlag: number): boolean {\r\n    return this.value === testFlag;\r\n  }\r\n\r\n  /**\r\n   * Checks if the current type value is exactly equal to any of the specified bitmasks.\r\n   * @param testFlags - The bitmasks to compare against.\r\n   * @returns True if the value matches any of the flags.\r\n   */\r\n  isEither(...testFlags: number[]): boolean {\r\n    for (let i = 0; i < testFlags.length; i++) {\r\n      if (this.is(testFlags[i])) return true;\r\n    }\r\n    return false;\r\n  }\r\n\r\n  /**\r\n   * Returns a string representation of the set flags (for debugging).\r\n   */\r\n  toString(): string {\r\n    const typeValue = this.value;\r\n    return Object.keys(TestType)\r\n      .filter(key => (TestType as any)[key] === typeValue)\r\n      .join('|');\r\n  }\r\n\r\n  // Base Flags\r\n  /** Indicates the entity has an 'only' property or decorator. */\r\n  static HAS_ONLY = 1;\r\n  /** Indicates the entity has a 'cases' property or decorator. */\r\n  static HAS_CASES = 2;\r\n  /** Indicates the entity has a custom 'title' property or decorator. */\r\n  static HAS_TITLE = 4;\r\n  /** Indicates the entity is a default export. */\r\n  static EXPORT_DEFAULT = 8;\r\n\r\n  // Composite Types\r\n  /** Indicates the entity is a module. */\r\n  static MODULE = 16;\r\n  static MODULE_WITH_TITLE = TestType.MODULE | TestType.HAS_TITLE;\r\n\r\n  /** Indicates the entity is a plain object. */\r\n  static OBJECT = 32;\r\n  static OBJECT_WITH_ONLY = TestType.OBJECT | TestType.HAS_ONLY;\r\n\r\n  /** Indicates the entity is a function. */\r\n  static FUNCTION = 64;\r\n  static FUNCTION_WITH_CASES = TestType.FUNCTION | TestType.HAS_CASES;\r\n  static FUNCTION_WITH_ONLY = TestType.FUNCTION | TestType.HAS_ONLY;\r\n  static FUNCTION_WITH_CASES_ONLY = TestType.FUNCTION_WITH_CASES | TestType.HAS_ONLY;\r\n  static FUNCTION_WITH_CASES_TITLE = TestType.FUNCTION_WITH_CASES | TestType.HAS_TITLE;\r\n  static FUNCTION_WITH_TITLE = TestType.FUNCTION | TestType.HAS_TITLE;\r\n  static FUNCTION_WITH_TITLE_ONLY = TestType.FUNCTION_WITH_TITLE | TestType.HAS_ONLY;\r\n\r\n  /** Indicates the entity is a built-in test runner function (e.g., 'beforeEach'). */\r\n  static BUILTIN = 128;\r\n  static BUILTIN_FUNCTION = TestType.BUILTIN | TestType.FUNCTION;\r\n\r\n  /** Indicates the entity is a class definition. */\r\n  static CLASS_DEF = 256;\r\n  static CLASS_DEF_EXPORT_DEFAULT = TestType.CLASS_DEF | TestType.EXPORT_DEFAULT;\r\n  static CLASS_DEF_WITH_ONLY = TestType.CLASS_DEF | TestType.HAS_ONLY;\r\n  static CLASS_DEF_WITH_TITLE = TestType.CLASS_DEF | TestType.HAS_TITLE;\r\n\r\n  /** Indicates the entity is a class instance. */\r\n  static CLASS_INST = 512;\r\n  static CLASS_INST_FUNCTION = TestType.CLASS_INST | TestType.FUNCTION;\r\n  static CLASS_INST_FUNCTION_WITH_CASES = TestType.CLASS_INST | TestType.FUNCTION_WITH_CASES;\r\n  static CLASS_INST_FUNCTION_WITH_ONLY = TestType.CLASS_INST | TestType.FUNCTION_WITH_ONLY;\r\n  static CLASS_INST_FUNCTION_WITH_ONLY_CASES = TestType.CLASS_INST | TestType.FUNCTION_WITH_CASES_ONLY;\r\n  static CLASS_INST_FUNCTION_WITH_TITLE = TestType.CLASS_INST | TestType.FUNCTION_WITH_TITLE;\r\n  static CLASS_INST_BUILTIN_FUNCTION = TestType.CLASS_INST | TestType.BUILTIN_FUNCTION;\r\n}\r\n\r\nconst MIN_FLAG = TestType.HAS_ONLY;\r\nconst MAX_FLAG = TestType.CLASS_INST_BUILTIN_FUNCTION;\r\n", "import {\r\n  throwNotInstance,\r\n  throwNotType,\r\n  throwNull,\r\n  throwUndefined\r\n} from '@esm-test/guards';\r\nimport { getChildGroupName } from '../../processors/pre/preProcessUtils.js';\r\nimport { TestType } from './testType.js';\r\n\r\n/**\r\n * Represents a discovered test or test group.\r\n */\r\nexport class Test {\r\n  /** The name of the group this test belongs to. */\r\n  groupName: string;\r\n  /** The name of the test or group. */\r\n  name: string;\r\n  /** The actual test function, class instance, or object. */\r\n  value: any;\r\n  /** The bitwise type information for the test. */\r\n  type: TestType;\r\n  /** Parameterized test cases, if any. */\r\n  testCases: any[];\r\n  /** The expression used to determine which tests to run (for 'only' functionality). */\r\n  onlyExpression: any;\r\n\r\n  /**\r\n   * Initializes a new Test instance.\r\n   * @param groupName - The parent group name.\r\n   * @param name - The test name.\r\n   * @param value - The test implementation or object.\r\n   * @param type - The bitwise type flags.\r\n   * @param testCases - Parameterized test cases.\r\n   * @param onlyExpression - Expression for 'only' filtering.\r\n   */\r\n  constructor (groupName: string, name: string, value: any, type: TestType, testCases: any[], onlyExpression: any) {\r\n    throwNotType(\"groupName\", groupName, \"string\");\r\n    throwNotType(\"name\", name, \"string\");\r\n\r\n    throwUndefined(\"value\", value);\r\n    throwNull(\"value\", value);\r\n\r\n    throwNotInstance(\"type\", type, TestType);\r\n    throwNotInstance(\"testCases\", testCases, Array);\r\n\r\n    throwUndefined(\"onlyExpression\", onlyExpression);\r\n    throwNull(\"onlyExpression\", onlyExpression);\r\n\r\n    this.groupName = groupName;\r\n    this.name = name;\r\n    this.value = value;\r\n    this.type = type;\r\n    this.testCases = testCases;\r\n    this.onlyExpression = onlyExpression;\r\n  }\r\n\r\n  /**\r\n   * Whether this test is marked as 'only'.\r\n   */\r\n  get isOnly(): boolean {\r\n    return this.type.has(TestType.HAS_ONLY);\r\n  }\r\n\r\n  /**\r\n   * Whether this entity represents a test group (e.g., a module, class, or object).\r\n   */\r\n  get isGroup(): boolean {\r\n    return this.type.isEither(\r\n      TestType.EXPORT_DEFAULT,\r\n      TestType.MODULE,\r\n      TestType.OBJECT,\r\n      TestType.OBJECT_WITH_ONLY,\r\n\r\n      TestType.CLASS_DEF,\r\n      TestType.CLASS_DEF_EXPORT_DEFAULT,\r\n      TestType.CLASS_DEF_WITH_TITLE,\r\n      TestType.CLASS_DEF_WITH_ONLY,\r\n\r\n      TestType.CLASS_INST\r\n    );\r\n  }\r\n\r\n  /**\r\n   * The unique key identifying this test, combining group name and name.\r\n   */\r\n  get key(): string {\r\n    return getChildGroupName(this.groupName, this.name);\r\n  }\r\n\r\n}\r\n", "import { throwNotInstance, throwNull, throwUndefined } from '@esm-test/guards';\r\nimport { TestParserOptions } from '../../options/testParserOptions.js';\r\nimport { TestCollection } from '../../parser/models/testCollection.js';\r\nimport { Test } from '../../parser/models/test.js';\r\nimport { isClassDefinition } from '../../parser/utils/classUtils.js';\r\nimport { isModule } from '../../parser/utils/moduleUtils.js';\r\n\r\n/**\r\n * Contextual information used during the post-processing phase of test extraction.\r\n */\r\nexport class PostProcessContext {\r\n  /** The original module or object being parsed. */\r\n  moduleToParse: any;\r\n  /** The configuration options for the parser. */\r\n  options: TestParserOptions;\r\n  /** The collection of tests generated during pre-processing. */\r\n  preTests: TestCollection;\r\n  /** The final collection of processed tests being built. */\r\n  postTests: TestCollection;\r\n\r\n  /**\r\n   * Initializes a new PostProcessContext.\r\n   * @param moduleToParse - The source module or object.\r\n   * @param options - Parser options.\r\n   * @param preTests - Tests from pre-processing.\r\n   * @param postTests - Target collection for final tests.\r\n   */\r\n  constructor(moduleToParse: any, options: TestParserOptions, preTests: TestCollection, postTests: TestCollection) {\r\n    throwUndefined(\"moduleToParse\", moduleToParse);\r\n    throwNull(\"moduleToParse\", moduleToParse);\r\n\r\n    if (!isModule(moduleToParse) && !isClassDefinition(moduleToParse)) {\r\n      throwNotInstance(\"moduleToParse\", moduleToParse, Object);\r\n    }\r\n\r\n    throwNotInstance(\"options\", options, TestParserOptions);\r\n    throwNotInstance(\"preTests\", preTests, TestCollection);\r\n    throwNotInstance(\"postTests\", postTests, TestCollection);\r\n\r\n    this.moduleToParse = moduleToParse;\r\n    this.options = options;\r\n    this.preTests = preTests;\r\n    this.postTests = postTests;\r\n  }\r\n\r\n  /**\r\n   * Finds the next test in the pre-processed collection that matches any of the specified type bits.\r\n   * \r\n   * @param startIndex - The index to start searching from.\r\n   * @param type - The bitmask flags to check for.\r\n   * @returns The matching test or null if not found.\r\n   */\r\n  nextHasEither(startIndex: number, ...type: number[]): Test | null {\r\n    const props = this.preTests;\r\n    for (let index = startIndex; index < props.length; index++) {\r\n      const prop = props[index];\r\n      if (prop.type.hasEither(...type)) {\r\n        return prop;\r\n      }\r\n    }\r\n    return null;\r\n  }\r\n\r\n}\r\n", "export * from './processClassInstTestCases.js';\r\nexport * from './processHasOnly.js';\r\nexport * from './processTestCases.js';", "import { TestParserOptions } from '../../options/testParserOptions.js';\r\nimport { Test, TestType } from '../../parser/models/all.js';\r\nimport { PostProcessContext } from '../models/postProcessContext.js';\r\n\r\n/**\r\n * Post-processor that expands class instance methods with test cases into individual test entries.\r\n * \r\n * @param test - The test representing a class method with parameterized cases.\r\n * @param index - The index of the test in the collection.\r\n * @param context - The post-processing context.\r\n * @returns True if the test was processed and expanded.\r\n */\r\nexport function processClassInstTestCases(test: Test, index: number, context: PostProcessContext): boolean {\r\n\r\n  if (test.type.has(TestType.CLASS_INST_FUNCTION_WITH_CASES)) {\r\n    const testCaseProperties = createClassInstTestCases(\r\n      test,\r\n      context.moduleToParse,\r\n      context.options\r\n    );\r\n\r\n    context.postTests.push(...testCaseProperties);\r\n\r\n    return true;\r\n  }\r\n\r\n  return false;\r\n}\r\n\r\n/**\r\n * Creates individual Test instances for each parameterized case of a class instance method.\r\n * \r\n * @param test - The template test containing the method and cases.\r\n * @param classInstance - The instance to bind the method to.\r\n * @param options - Parser options for title templating.\r\n * @returns An array of expanded Test instances.\r\n */\r\nfunction createClassInstTestCases(test: Test, classInstance: any, options: TestParserOptions): Test[] {\r\n  const { name, value: testFn, testCases } = test;\r\n\r\n  const results: Test[] = [];\r\n  testCases.forEach(\r\n    (testCasesArgs, testCaseIndex) => {\r\n      const testCaseArgs = [...testCasesArgs, testCaseIndex];\r\n      const testCaseFn = testFn.bind(classInstance, ...testCaseArgs);\r\n      const newTestCase = new Test(\r\n        test.groupName,\r\n        options.testCaseTitleTemplate(name, testCasesArgs, testCaseIndex),\r\n        testCaseFn,\r\n        test.type,\r\n        test.testCases,\r\n        test.onlyExpression\r\n      );\r\n      results.push(newTestCase);\r\n    }\r\n  )\r\n\r\n  return results;\r\n}", "import { Test, TestCollection, TestType } from '../../parser/models/all.js';\r\nimport { ContextLookUp } from '../../options/testParserOptions.js';\r\n\r\n/**\r\n * Applies the 'only' filter expression to a range of tests within a collection.\r\n * Depending on the expression ('*' or a number or boolean), it marks subsequent tests in the same group as 'only'.\r\n * \r\n * @param test - The test carrying the 'only' expression.\r\n * @param index - The index of the current test in the collection.\r\n * @param tests - The collection of tests to apply the filter to.\r\n */\r\nexport function applyOnlyExpression(test: Test, index: number, tests: TestCollection): void {\r\n  let onlyCount = 0;\r\n  const { groupName, onlyExpression } = test;\r\n\r\n  if (onlyExpression === '*') {\r\n    onlyCount = tests.length;\r\n  } else if (typeof (+onlyExpression) === 'number') {\r\n    onlyCount = index + (+onlyExpression);\r\n  }\r\n\r\n  onlyCount = Math.min(onlyCount, tests.length);\r\n  for (let i = index; i < onlyCount; i++) {\r\n    const nextTest = tests[i];\r\n\r\n    // ensure the nextTest is in the same group\r\n    if (nextTest.groupName != groupName) continue;\r\n\r\n    // don't process built in functions\r\n    if (nextTest.type.has(TestType.BUILTIN_FUNCTION)) {\r\n      continue;\r\n    }\r\n\r\n    // set type if it isn't already set\r\n    if (nextTest.isOnly === false) {\r\n      nextTest.type.value |= TestType.HAS_ONLY\r\n    }\r\n  }\r\n}\r\n\r\n/**\r\n * Creates a wrapped test function that injects the appropriate context and arguments for a test case.\r\n * It handles varying function lengths to maintain compatibility with test runners (e.g., done callbacks).\r\n * \r\n * @param groupName - The name of the test group.\r\n * @param testContextLookup - The function used to retrieve the group's context.\r\n * @param testFn - The original test function.\r\n * @param testCaseArgs - The arguments to be passed to the test function for this case.\r\n * @returns A new function that, when called, executes the test with the correct context and arguments.\r\n */\r\nexport function createTestCaseFn(groupName: string, testContextLookup: ContextLookUp, testFn: Function, testCaseArgs: any[]): Function {\r\n  // some test runners inspect the test fn length\r\n  // when the length is > 0 they then pass their utility args to the test fn\r\n  // i.e. a done() callback\r\n  if (testFn.length <= testCaseArgs.length) {\r\n    return function(this: any) {\r\n      const thisArg = testContextLookup(groupName);\r\n      return testFn.call(thisArg, ...testCaseArgs);\r\n    }\r\n  } else if ((testFn.length - testCaseArgs.length) === 1) {\r\n    // ensures the length of the function is at least 1\r\n    return function(this: any, first: any, ...args: any[]) {\r\n      const thisArg = testContextLookup(groupName);\r\n      return testFn.call(thisArg, ...testCaseArgs, first, ...args);\r\n    }\r\n  } else {\r\n    // ensures the length of the function is at least 2\r\n    return function(this: any, first: any, second: any, ...args: any[]) {\r\n      const thisArg = testContextLookup(groupName);\r\n      return testFn.call(thisArg, ...testCaseArgs, first, second, ...args);\r\n    }\r\n  }\r\n}\r\n", "import { Test, TestType } from '../../parser/models/all.js';\r\nimport { isOnlyField } from '../../parser/utils/testOnlyUtils.js';\r\nimport { PostProcessContext } from '../models/postProcessContext.js';\r\nimport { applyOnlyExpression } from './postProcessUtils.js';\r\n\r\n/**\r\n * Post-processor that handles 'only' metadata. \r\n * If a test or an 'only' literal field is encountered, it applies the filter to the surrounding tests.\r\n * \r\n * @param test - The test or field to check for 'only' metadata.\r\n * @param index - The current index in the pre-tests collection.\r\n * @param context - The post-processing context. \r\n * @returns True if the item was an 'only' literal field and should be removed from the final collection.\r\n */\r\nexport function processHasOnly(test: Test, index: number, context: PostProcessContext): boolean {\r\n  if (test.type.has(TestType.HAS_ONLY) === false) {\r\n    return false;\r\n  }\r\n\r\n  if (test.type.is(TestType.OBJECT_WITH_ONLY) === false) {\r\n\r\n    applyOnlyExpression(\r\n      test,\r\n      index,\r\n      context.preTests\r\n    );\r\n\r\n    return false;\r\n  }\r\n\r\n  // check if this is an only field\r\n  if (isOnlyField(test.name, context.options) === false) return false;\r\n\r\n  // get the next object or function test\r\n  const nextIndex = index + 1;\r\n  const nextTest = context.nextHasEither(\r\n    nextIndex,\r\n    TestType.OBJECT,\r\n    TestType.FUNCTION\r\n  );\r\n\r\n  if (nextTest !== null) {\r\n    nextTest.groupName = test.groupName;\r\n    nextTest.type.value |= TestType.HAS_ONLY;\r\n    nextTest.onlyExpression = test.onlyExpression;\r\n\r\n    applyOnlyExpression(\r\n      test,\r\n      nextIndex,\r\n      context.preTests\r\n    );\r\n  }\r\n\r\n  // prevent the only field from further processing\r\n  return true;\r\n}", "import { TestParserOptions } from '../../options/testParserOptions.js';\r\nimport { Test, TestType } from '../../parser/models/all.js';\r\nimport { PostProcessContext } from '../models/postProcessContext.js';\r\nimport { createTestCaseFn } from './postProcessUtils.js';\r\n\r\n/**\r\n * Post-processor that expands pure functions with test cases into individual test entries.\r\n * \r\n * @param test - The test representing a function with parameterized cases.\r\n * @param index - The index of the test in the collection.\r\n * @param context - The post-processing context.\r\n * @returns True if the test was processed and expanded.\r\n */\r\nexport function processTestCases(test: Test, index: number, context: PostProcessContext): boolean {\r\n  if (test.type.has(TestType.FUNCTION_WITH_CASES)) {\r\n    const testCaseProperties = createTestCases(test, context.options);\r\n    context.postTests.push(...testCaseProperties);\r\n    return true;\r\n  }\r\n\r\n  return false;\r\n}\r\n\r\n/**\r\n * Creates individual Test instances for each parameterized case of a pure function.\r\n * \r\n * @param test - The template test containing the function and cases.\r\n * @param options - Parser options for context lookup and title templating.\r\n * @returns An array of expanded Test instances.\r\n */\r\nfunction createTestCases(test: Test, options: TestParserOptions): Test[] {\r\n  const {\r\n    name,\r\n    value: testFn,\r\n    groupName,\r\n    testCases\r\n  } = test;\r\n\r\n  const testContextLookup = options.testContextLookup;\r\n\r\n  const results: Test[] = [];\r\n  testCases.forEach(\r\n    (testCasesArgs, testCaseIndex) => {\r\n      const testCaseArgs = [...testCasesArgs, testCaseIndex];\r\n\r\n      const testCaseFn = createTestCaseFn(\r\n        groupName,\r\n        testContextLookup,\r\n        testFn,\r\n        testCaseArgs\r\n      );\r\n\r\n      const newTestCase = new Test(\r\n        test.groupName,\r\n        options.testCaseTitleTemplate(name, testCasesArgs, testCaseIndex),\r\n        testCaseFn,\r\n        test.type,\r\n        test.testCases,\r\n        test.onlyExpression\r\n      );\r\n\r\n      results.push(newTestCase);\r\n    }\r\n  )\r\n\r\n  return results;\r\n}", "import { TestModule } from '#src/extractTestsFromModule';\r\nimport { TestParserOptions } from '../options/testParserOptions.js';\r\nimport { Test, TestCollection } from '../parser/models/all.js';\r\nimport { PostProcessContext } from './models/postProcessContext.js';\r\nimport * as TestProcessors from './post/all.js';\r\n\r\nconst postProcessorOrder = [\r\n  \"processHasOnly\",\r\n  \"processClassInstTestCases\",\r\n  \"processTestCases\",\r\n];\r\n\r\n/**\r\n * A function that further refines or expands a discovered test.\r\n * @param test - The test to process.\r\n * @param index - The index of the test in the pre-processed collection.\r\n * @param context - The post-processing context.\r\n * @returns True if the test was handled and should not be automatically added to the final collection.\r\n */\r\nexport type PostProcessor = (\r\n  test: Test,\r\n  index: number,\r\n  context: PostProcessContext\r\n) => boolean;\r\n\r\nconst postProcessors: PostProcessor[] = postProcessorOrder.map(\r\n  pk => (TestProcessors as any)[pk]\r\n);\r\n\r\n/**\r\n * Executes the post-processing phase of the test parsing pipeline.\r\n * Handles logic like parameterized test expansion and 'only' filter application.\r\n * \r\n * @param moduleToParse - The original module containing the tests.\r\n * @param preTests - The collection of tests from the pre-processing phase.\r\n * @param options - Parser configuration options.\r\n * @returns A {@link TestCollection} containing the final, fully processed tests.\r\n */\r\nexport function executePostProcessing(moduleToParse: TestModule, preTests: TestCollection, options: TestParserOptions): TestCollection {\r\n  const postTests = new TestCollection();\r\n\r\n  const postProcessContext = new PostProcessContext(\r\n    moduleToParse,\r\n    options,\r\n    preTests,\r\n    postTests\r\n  );\r\n\r\n  preTests.forEach((test, testIndex) => {\r\n    for (let index = 0; index < postProcessors.length; index++) {\r\n      const processor = postProcessors[index];\r\n      const processResult = processor(test, testIndex, postProcessContext);\r\n      if (processResult === true) return;\r\n    }\r\n\r\n    postTests.push(test);\r\n  });\r\n\r\n  return postTests;\r\n}\r\n", "import { SortByMethod, TestCollection } from './parser/models/testCollection.js';\r\nimport { TestParserOptions } from './options/testParserOptions.js';\r\nimport { parseObjectFields } from './parser/parseObjectFields.js';\r\nimport { executePostProcessing } from './processors/executePostProcessing.js';\r\nimport { executePreProcessing } from './processors/executePreProcessing.js';\r\n\r\n/**\r\n * Represents a module to be parsed for tests.\r\n * Typically a record of exported functions, classes, or objects.\r\n */\r\nexport type TestModule = Record<string, any>\r\n\r\n/**\r\n * Extracts tests from a given module based on the provided options.\r\n * \r\n * This function orchestrates the full parsing pipeline:\r\n * 1. Parses raw object fields from the module.\r\n * 2. Executes pre-processing to identify initial test structures.\r\n * 3. Executes post-processing to expand test cases and apply filters.\r\n * 4. Optionally sorts the resulting test collection.\r\n * \r\n * @param moduleToParse - The JavaScript module or object containing test definitions.\r\n * @param options - Configuration options for the test parser.\r\n * @returns A {@link TestCollection} containing the extracted and processed tests.\r\n */\r\nexport function extractTestsFromModule(moduleToParse: TestModule, options: Partial<TestParserOptions>): TestCollection {\r\n  const parserOptions = new TestParserOptions(options);\r\n\r\n  // pre process module fields\r\n  const fields = parseObjectFields(\"root\", moduleToParse);\r\n  const tests = executePreProcessing(fields, parserOptions);\r\n\r\n  // post process tests\r\n  const testCollection = executePostProcessing(\r\n    moduleToParse,\r\n    tests,\r\n    parserOptions\r\n  );\r\n\r\n  // get the sort method\r\n  const sortMethod = SortByMethod[parserOptions.sort!]\r\n\r\n  // return sorted collection\r\n  return sortMethod\r\n    ? new TestCollection(testCollection.sortBy(sortMethod))\r\n    : testCollection;\r\n}\r\n", "export * from './decorators/all.js';\r\nexport * from './extractTestsFromModule.js';\r\nexport * from './options/testParserFlags.js';\r\nexport * from './options/testParserOptions.js';\r\nexport * from './parser/models/test.js';\r\nexport * from './parser/models/testCollection.js';\r\nexport * from './parser/models/testType.js';\r\n\r\nimport { keywords } from './parser/keywords.js';\r\n\r\n/**\r\n * Keyword for marking a test or group as 'only' for execution filtering.\r\n */\r\nexport const only = keywords.only;\r\n\r\n/**\r\n * Helper object providing access to test metadata keywords.\r\n */\r\nexport const test = {\r\n  /** Keyword for 'only' filtering. */\r\n  only: keywords.only,\r\n  /** Keyword for custom test titles. */\r\n  title: keywords.title,\r\n  /** Keyword for parameterized test cases. */\r\n  cases: keywords.cases\r\n}\r\n", "import { SortByEnum, TestParserFlags } from 'esm-test-parser';\n\n/**\n * Built-in Mocha hook functions that can be defined in ESM modules.\n */\nexport const builtInFunctions = [\n  'beforeAll',\n  'beforeEach',\n  'afterAll',\n  'afterEach',\n];\n\n/**\n * Default options for the Mocha UI ESM.\n */\nconst defaultOptions: Partial<MochaUiEsmOptions> = {\n  classContextPropertyName: 'suiteContext',\n  parserFlags: {\n    allowLiteralOnly: true,\n    allowLiteralTitle: true,\n    allowLiteralCases: true,\n  },\n  sort: SortByEnum.none,\n};\n\n/**\n * Configuration options for the Mocha UI for ESM.\n */\nexport class MochaUiEsmOptions {\n  /**\n   * Sets the property name used for accessing the context inside class tests.\n   * The default value is 'suiteContext'.\n   *\n   * @example\n   * ```ts\n   * test1() {\n   *   console.log(this.suiteContext.test.title)\n   * }\n   * ```\n   */\n  classContextPropertyName?: string = 'suiteContext';\n\n  /**\n   * Test case title template function.\n   *\n   * The default function will replace `$num` arguments with test case argument values.\n   *\n   * @example\n   * - test case args: `[[5, 10]]`\n   * - title input: `expected $1 to be $2 (case $i)`\n   * - title output: `expected 5 to be 10 (case 1)`\n   *\n   * @param title - The template title string.\n   * @param testCases - The test case arguments.\n   * @param caseIndex - The 0-based index of the current test case.\n   * @returns The formatted title.\n   */\n  testCaseTitleTemplate?: (\n    title: string,\n    testCases: any[],\n    caseIndex: number,\n  ) => string;\n\n  /**\n   * Flags passed to the underlying test parser.\n   */\n  parserFlags: Partial<TestParserFlags> = {\n    allowLiteralOnly: true,\n    allowLiteralTitle: true,\n    allowLiteralCases: true,\n  };\n\n  /**\n   * Specifies the sorting strategy for tests.\n   *\n   * Possible values:\n   * - \"none\" (default)\n   * - \"byGroup\"\n   * - \"byTitle\"\n   * - \"byTitleAndGroup\"\n   */\n  sort: SortByEnum = SortByEnum.none;\n\n  /**\n   * Initializes a new instance of the MochaUiEsmOptions class.\n   *\n   * @param options - Partial configuration to override defaults.\n   */\n  constructor(options?: Partial<MochaUiEsmOptions>) {\n    Object.assign(this, defaultOptions, options);\n  }\n}\n", "import {\n  extractTestsFromModule,\n  Test,\n  TestParserFlags,\n  TestParserOptions,\n  TestType,\n} from 'esm-test-parser';\nimport * as Mocha from 'mocha';\nimport { builtInFunctions, MochaUiEsmOptions } from './mochaUiEsmOptions.js';\n\n/**\n * Extracts test definitions from an ESM module and adds them to a Mocha suite.\n *\n * This function uses `esm-test-parser` to identify tests, groups, and built-in hooks\n * exported from the module and registers them with Mocha.\n *\n * @param rootSuite - The top-level Mocha suite to add tests to.\n * @param options - Configuration options for the ESM UI.\n * @param moduleToParse - The ESM module object to extract tests from.\n */\nexport function getTestsFromEsmModule(\n  rootSuite: Mocha.Suite,\n  options: MochaUiEsmOptions,\n  moduleToParse: any,\n): void {\n  // create the suite map and add the root suite\n  const suiteMap: Record<string, Mocha.Suite> = {\n    root: rootSuite,\n  };\n\n  // create esm parser options\n  const esmParserOptions: Partial<TestParserOptions> = {\n    // mocha built in function names\n    builtInFunctions,\n    // class instance property name to access the mocha context\n    classContextPropertyName: options.classContextPropertyName,\n    // map the suite context to each test function or class instance\n    testContextLookup: (suiteName: string) => suiteMap[suiteName].ctx,\n    // map parser flags\n    parserFlags: new TestParserFlags(options.parserFlags || {}),\n    // sorting\n    sort: options.sort,\n  };\n\n  if (options.testCaseTitleTemplate) {\n    esmParserOptions.testCaseTitleTemplate = options.testCaseTitleTemplate;\n  }\n\n  // extract tests from the module\n  const tests = extractTestsFromModule(moduleToParse, esmParserOptions);\n\n  // iterate the test properties\n  tests.forEach((test: Test) => {\n    // check if this is a suite\n    if (test.isGroup) {\n      createSuite(suiteMap, test);\n      return;\n    }\n\n    // check if this is a built in function\n    if (test.type.has(TestType.BUILTIN_FUNCTION)) {\n      const suite = suiteMap[test.groupName];\n      (suite as any)[test.name](test.value);\n      return;\n    }\n\n    // check if this is a test function\n    if (test.type.has(TestType.FUNCTION)) {\n      const mochaTest = new Mocha.Test(test.name, test.value);\n\n      // get the test function suite and add the test\n      const suite = suiteMap[test.groupName];\n      suite.addTest(mochaTest);\n\n      // set the test as only\n      if (test.isOnly) (suite as any).appendOnlyTest(mochaTest);\n\n      return;\n    }\n  });\n}\n\n/**\n * Creates a new Mocha sub-suite based on the provided test definition.\n *\n * It manages sub-suite naming and avoids duplicate suite creation.\n *\n * @param suiteMap - A map of existing Mocha suites, indexed by a unique string.\n * @param test - The test group definition from the parser.\n */\nfunction createSuite(suiteMap: Record<string, Mocha.Suite>, test: any): void {\n  const parentSuiteName = test.groupName;\n  const childSuiteName = parentSuiteName + '_' + test.name;\n\n  // check if the child suite exists already\n  const suiteExists = Object.hasOwn(suiteMap, childSuiteName);\n  if (suiteExists) return;\n\n  // create a new child suite\n  const parentSuite = suiteMap[parentSuiteName];\n  const childSuite = Mocha.Suite.create(parentSuite, test.name);\n\n  // add the new child suite to the map\n  suiteMap[childSuiteName] = childSuite;\n\n  // set the suite as only in the parent suite\n  if (test.isOnly) (parentSuite as any).appendOnlySuite(childSuite);\n}\n"],
  "mappings": "ukBAAA,IAAAA,GAAA,GAAAC,GAAAD,GAAA,uBAAAE,EAAA,eAAAC,EAAA,iBAAAC,EAAA,SAAAC,EAAA,mBAAAC,EAAA,4CAAAC,EAAA,2BAAAC,GAAA,2BAAAC,EAAA,SAAAC,GAAA,uBAAAC,GAAA,SAAAC,GAAA,a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,IAAI,EAAEA,EAAK,KAAK,EACpC,MACF,CAGA,GAAIA,EAAK,KAAK,IAAI,EAAS,QAAQ,EAAG,CACpC,IAAME,EAAY,IAAU,OAAKF,EAAK,KAAMA,EAAK,KAAK,EAGhDG,EAAQR,EAASK,EAAK,SAAS,EACrCG,EAAM,QAAQD,CAAS,EAGnBF,EAAK,QAASG,EAAc,eAAeD,CAAS,EAExD,MACF,CACF,CAAC,CACH,CAUA,SAASD,GAAYN,EAAuCK,EAAiB,CAC3E,IAAMI,EAAkBJ,EAAK,UACvBK,EAAiBD,EAAkB,IAAMJ,EAAK,KAIpD,GADoB,OAAO,OAAOL,EAAUU,CAAc,EACzC,OAGjB,IAAMC,EAAcX,EAASS,CAAe,EACtCG,EAAmB,QAAM,OAAOD,EAAaN,EAAK,IAAI,EAG5DL,EAASU,CAAc,EAAIE,EAGvBP,EAAK,QAASM,EAAoB,gBAAgBC,CAAU,CAClE,CnDxFO,SAASC,GACdC,EACAC,EACM,CACND,EAAgB,IAAM,SAAUE,EAAoB,CAClDA,EAAM,GAAG,UAAYC,GACnBC,GAAsBF,EAAO,IAAIG,EAAkBJ,CAAO,EAAGE,CAAO,CACtE,CACF,CACF,CAEA,IAAOG,GAAQP",
  "names": ["index_exports", "__export", "MochaUiEsmOptions", "G", "H", "u", "C", "g", "index_default", "Ko", "zo", "registerMochaUiEsm", "Qo", "pe", "se", "ie", "__toCommonJS", "only", "title", "cases", "defaultExport", "moduleTag", "keywords", "isOnlyField", "name", "options", "hasOnly", "value", "hasOnlyDecorator", "isOnlyExpressionSupported", "expression", "getDecoratorInfo", "key", "testOnly", "expressionArg", "targetProto", "childKey", "decInfo", "exprSupported", "createErrorMessage", "target", "targetName", "testTitle", "testCase", "args", "TestCollection", "initialArray", "compareMethod", "isType", "x", "isTypes", "hasType", "hasTypes", "SortByEnum", "SortByMethod", "a", "b", "groupComare", "stringCompare", "compare", "al", "bl", "notComplexObjectMessage", "guardName", "throwNotComplexObject", "guard", "isComplexObject", "nullMessage", "throwNull", "notTypeMessage", "guardType", "throwNotType", "undefinedMessage", "throwUndefined", "notInstanceOrObjectMessage", "throwNotInstanceOrObject", "notInstanceMessage", "throwNotInstance", "notObjectKeyMessage", "throwNotObjectKey", "guardObjectKey", "simpleReplace", "testCases", "caseIndex", "newTitle", "arg", "index", "hasPureFunctionCases", "getFunctionTestCases", "mapTestCases", "getPureFunctionCases", "defaultParserFlags", "TestParserFlags", "parserFlags", "c", "defaultOptions", "groupName", "TestParserOptions", "_TestParserOptions", "K", "U", "k", "ObjectField", "i", "parseObjectFields", "moduleToParse", "fields", "ClassInstanceField", "classInstance", "ignoreClassInstFields", "parserClassInstFields", "classProto", "forEachClassProto", "keys", "ignoreProtoFields", "PreProcessContext", "tests", "all_exports", "__export", "processClassDef", "processClassInstFunction", "processClassInstance", "processDefaultExport", "processFunction", "processFunctionWithCasesArray", "processModule", "processObject", "processOnlyField", "isClassDefinition", "isClassInstance", "proto", "hasTitle", "getTitle", "hasTitleDecorator", "field", "context", "isClassDefWithOnly", "isClassDefWithTitle", "isDefaultExport", "type", "TestType", "nameOrTitle", "Test", "childGroupName", "getChildGroupName", "testProps", "getClassInstanceChildren", "isClassInstBuiltInFunction", "isClassInstFunctionWithOnly", "isClassInstFunctionWithCases", "isClassInstFunctionWithTitle", "onlyExpression", "processChildObjectFields", "isFunctionBuiltIn", "isPureFunctionWithOnly", "isPureFunctionWithTitle", "isPureFunctionWithCases", "boundFn", "getTestValueAsFunction", "testFn", "thisArg", "first", "second", "isModule", "moduleTestGroup", "objectTestProp", "preProcessorOrder", "preProcessors", "pk", "executePreProcessing", "fieldIndex", "preProcessContext", "processor", "childFields", "defineClassContextGetter", "_TestType", "MIN_FLAG", "MAX_FLAG", "testFlag", "testFlags", "typeValue", "PostProcessContext", "preTests", "postTests", "startIndex", "props", "prop", "processClassInstTestCases", "processHasOnly", "processTestCases", "test", "testCaseProperties", "createClassInstTestCases", "results", "testCasesArgs", "testCaseIndex", "testCaseArgs", "testCaseFn", "newTestCase", "applyOnlyExpression", "onlyCount", "nextTest", "createTestCaseFn", "testContextLookup", "nextIndex", "createTestCases", "postProcessorOrder", "postProcessors", "executePostProcessing", "postProcessContext", "testIndex", "extractTestsFromModule", "parserOptions", "testCollection", "sortMethod", "builtInFunctions", "defaultOptions", "G", "MochaUiEsmOptions", "options", "Mocha", "getTestsFromEsmModule", "rootSuite", "options", "moduleToParse", "suiteMap", "esmParserOptions", "builtInFunctions", "suiteName", "Ko", "test", "createSuite", "mochaTest", "suite", "parentSuiteName", "childSuiteName", "parentSuite", "childSuite", "registerMochaUiEsm", "mochaInterfaces", "options", "suite", "modules", "getTestsFromEsmModule", "MochaUiEsmOptions", "index_default"]
}
