{"version":3,"file":"asyncMatcherWrapper.cjs","sources":["../../../src/matchers/asyncMatcherWrapper.js"],"sourcesContent":["/**\n * Async Matcher Wrapper for enhanced test runner infrastructure\n * This module provides proper async matcher execution and result handling\n */\nclass AsyncMatcherResult {\n  constructor(promise, matcherName, received, expected, isNot = false) {\n    this.promise = promise;\n    this.matcherName = matcherName;\n    this.received = received;\n    this.expected = expected;\n    this.isNot = isNot;\n    this.resolved = false;\n    this.result = null;\n    this.error = null;\n  }\n\n  async execute() {\n    try {\n      this.result = await this.promise;\n      this.resolved = true;\n      \n      if (this.result && this.result.success === false && this.result.error) {\n        throw this.result.error;\n      }\n      \n      return this.result;\n    } catch (error) {\n      this.error = error;\n      this.resolved = true;\n      throw error;\n    }\n  }\n\n  isSuccess() {\n    return this.resolved && !this.error && this.result && this.result.success !== false;\n  }\n\n  shouldThrow() {\n    return this.resolved && this.result && this.result.success === false;\n  }\n\n  getError() {\n    return this.error;\n  }\n\n  getResult() {\n    return this.result;\n  }\n}\n\nexport function createAsyncMatcherWrapper(matcherFn, matcherName) {\n  return function(received, ...args) {\n    const expected = args.length > 0 ? args[0] : undefined;\n    const promise = matcherFn(received, ...args);\n    return new AsyncMatcherResult(promise, matcherName, received, expected);\n  };\n}\n\nexport function isAsyncMatcherResult(obj) {\n  return obj && obj.constructor === AsyncMatcherResult;\n}\n\nexport { AsyncMatcherResult };\n"],"names":[],"mappings":";;AAAA;AACA;AACA;AACA;AACA,MAAM,kBAAkB,CAAC;AACzB,EAAE,WAAW,CAAC,OAAO,EAAE,WAAW,EAAE,QAAQ,EAAE,QAAQ,EAAE,KAAK,GAAG,KAAK,EAAE;AACvE,IAAI,IAAI,CAAC,OAAO,GAAG,OAAO;AAC1B,IAAI,IAAI,CAAC,WAAW,GAAG,WAAW;AAClC,IAAI,IAAI,CAAC,QAAQ,GAAG,QAAQ;AAC5B,IAAI,IAAI,CAAC,QAAQ,GAAG,QAAQ;AAC5B,IAAI,IAAI,CAAC,KAAK,GAAG,KA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