{"version":3,"sources":["../../src/testing/providers/MockJsonApiProvider.tsx","../../src/testing/factories/createMockModule.ts","../../src/testing/factories/createMockResponse.ts","../../src/testing/factories/createMockService.ts","../../src/testing/factories/createMockApiData.ts","../../src/testing/matchers/jsonApiMatchers.ts","../../src/testing/utils/renderWithProviders.tsx"],"sourcesContent":["\"use client\";\n\nimport React from \"react\";\nimport { JsonApiConfig, JsonApiContext } from \"../../client/context/JsonApiContext\";\n\nexport interface MockJsonApiProviderProps {\n  children: React.ReactNode;\n  config?: Partial<JsonApiConfig>;\n}\n\nconst defaultMockConfig: JsonApiConfig = {\n  apiUrl: \"https://api.test.com\",\n  tokenGetter: async () => \"mock-token-for-testing\",\n  languageGetter: async () => \"en\",\n  defaultHeaders: {},\n  onError: () => {},\n  cacheConfig: {\n    defaultProfile: \"default\",\n  },\n};\n\n/**\n * A test-friendly provider that wraps components with mock JSON:API context.\n *\n * @example\n * ```tsx\n * import { MockJsonApiProvider } from '@carlonicora/nextjs-jsonapi/testing';\n *\n * render(\n *   <MockJsonApiProvider>\n *     <MyComponent />\n *   </MockJsonApiProvider>\n * );\n * ```\n *\n * @example With custom config\n * ```tsx\n * render(\n *   <MockJsonApiProvider config={{ apiUrl: 'https://custom.api.com' }}>\n *     <MyComponent />\n *   </MockJsonApiProvider>\n * );\n * ```\n */\nexport function MockJsonApiProvider({ children, config }: MockJsonApiProviderProps) {\n  const mergedConfig: JsonApiConfig = {\n    ...defaultMockConfig,\n    ...config,\n  };\n\n  return <JsonApiContext.Provider value={mergedConfig}>{children}</JsonApiContext.Provider>;\n}\n\nexport { defaultMockConfig };\n","import { ApiRequestDataTypeInterface } from \"../../core/interfaces/ApiRequestDataTypeInterface\";\n\nexport interface CreateMockModuleOptions {\n  name: string;\n  cache?: string;\n  inclusions?: ApiRequestDataTypeInterface[\"inclusions\"];\n}\n\n/**\n * Creates a mock module definition for testing.\n *\n * @example\n * ```ts\n * import { createMockModule } from '@carlonicora/nextjs-jsonapi/testing';\n *\n * const mockArticleModule = createMockModule({ name: 'articles' });\n * ```\n */\nexport function createMockModule(options: CreateMockModuleOptions): ApiRequestDataTypeInterface {\n  // Create a mock model class\n  class MockModel {\n    id = \"mock-id\";\n    type = options.name;\n  }\n\n  return {\n    name: options.name,\n    cache: options.cache,\n    inclusions: options.inclusions,\n    model: MockModel,\n  };\n}\n","import { ApiResponseInterface } from \"../../core/interfaces/ApiResponseInterface\";\nimport { ApiDataInterface } from \"../../core/interfaces/ApiDataInterface\";\n\nexport interface CreateMockResponseOptions {\n  data?: ApiDataInterface | ApiDataInterface[] | null;\n  ok?: boolean;\n  response?: number;\n  error?: string;\n  meta?: Record<string, any>;\n  self?: string;\n  next?: string;\n  prev?: string;\n}\n\n/**\n * Creates a mock API response for testing.\n *\n * @example\n * ```ts\n * import { createMockResponse, createMockApiData } from '@carlonicora/nextjs-jsonapi/testing';\n *\n * const mockData = createMockApiData({ type: 'articles', id: '1' });\n * const response = createMockResponse({ data: mockData, ok: true });\n * ```\n *\n * @example With pagination\n * ```ts\n * const response = createMockResponse({\n *   data: [mockData],\n *   ok: true,\n *   next: '/articles?page=2',\n *   prev: '/articles?page=0',\n * });\n * ```\n */\nexport function createMockResponse(options: CreateMockResponseOptions = {}): ApiResponseInterface {\n  const {\n    data = null,\n    ok = true,\n    response = ok ? 200 : 500,\n    error = ok ? \"\" : \"Error\",\n    meta,\n    self,\n    next,\n    prev,\n  } = options;\n\n  const mockResponse: ApiResponseInterface = {\n    ok,\n    response,\n    data: data as ApiDataInterface | ApiDataInterface[],\n    error,\n    meta,\n    self,\n    next,\n    prev,\n  };\n\n  // Add pagination methods if next/prev provided\n  if (next) {\n    mockResponse.nextPage = async () => createMockResponse({ ...options, next: undefined, prev: self });\n  }\n\n  if (prev) {\n    mockResponse.prevPage = async () => createMockResponse({ ...options, prev: undefined, next: self });\n  }\n\n  return mockResponse;\n}\n\n/**\n * Creates a mock error response for testing error scenarios.\n *\n * @example\n * ```ts\n * import { createMockErrorResponse } from '@carlonicora/nextjs-jsonapi/testing';\n *\n * const errorResponse = createMockErrorResponse(404, 'Not Found');\n * ```\n */\nexport function createMockErrorResponse(statusCode: number, errorMessage: string): ApiResponseInterface {\n  return createMockResponse({\n    ok: false,\n    response: statusCode,\n    error: errorMessage,\n    data: null,\n  });\n}\n","import { vi, type Mock } from \"vitest\";\nimport { ApiResponseInterface } from \"../../core/interfaces/ApiResponseInterface\";\nimport { createMockResponse } from \"./createMockResponse\";\n\nexport type MockApiMethod = Mock<(...args: any[]) => Promise<ApiResponseInterface>>;\n\nexport interface MockService {\n  get: MockApiMethod;\n  post: MockApiMethod;\n  put: MockApiMethod;\n  patch: MockApiMethod;\n  delete: MockApiMethod;\n}\n\nexport interface CreateMockServiceOptions {\n  defaultResponse?: ApiResponseInterface;\n}\n\n/**\n * Creates a mock service with Vitest mock functions for all HTTP methods.\n *\n * @example\n * ```ts\n * import { createMockService, createMockResponse } from '@carlonicora/nextjs-jsonapi/testing';\n *\n * const mockService = createMockService();\n * mockService.get.mockResolvedValue(createMockResponse({ data: mockData }));\n *\n * // Use in test\n * expect(mockService.get).toHaveBeenCalled();\n * ```\n *\n * @example With default response\n * ```ts\n * const mockService = createMockService({\n *   defaultResponse: createMockResponse({ ok: true, data: [] }),\n * });\n * ```\n */\nexport function createMockService(options: CreateMockServiceOptions = {}): MockService {\n  const defaultResponse = options.defaultResponse ?? createMockResponse({ ok: true });\n\n  return {\n    get: vi.fn().mockResolvedValue(defaultResponse),\n    post: vi.fn().mockResolvedValue(defaultResponse),\n    put: vi.fn().mockResolvedValue(defaultResponse),\n    patch: vi.fn().mockResolvedValue(defaultResponse),\n    delete: vi.fn().mockResolvedValue(defaultResponse),\n  };\n}\n\n/**\n * Creates a mock service that returns errors for all methods.\n *\n * @example\n * ```ts\n * import { createMockErrorService } from '@carlonicora/nextjs-jsonapi/testing';\n *\n * const errorService = createMockErrorService(500, 'Internal Server Error');\n * ```\n */\nexport function createMockErrorService(statusCode: number = 500, errorMessage: string = \"Error\"): MockService {\n  const errorResponse = createMockResponse({\n    ok: false,\n    response: statusCode,\n    error: errorMessage,\n  });\n\n  return {\n    get: vi.fn().mockResolvedValue(errorResponse),\n    post: vi.fn().mockResolvedValue(errorResponse),\n    put: vi.fn().mockResolvedValue(errorResponse),\n    patch: vi.fn().mockResolvedValue(errorResponse),\n    delete: vi.fn().mockResolvedValue(errorResponse),\n  };\n}\n","import { ApiDataInterface } from \"../../core/interfaces/ApiDataInterface\";\n\nexport interface CreateMockApiDataOptions {\n  type: string;\n  id?: string;\n  attributes?: Record<string, any>;\n  relationships?: Record<string, any>;\n  included?: any[];\n  createdAt?: Date;\n  updatedAt?: Date;\n  self?: string;\n}\n\n/**\n * Creates a mock ApiDataInterface object for testing.\n *\n * @example\n * ```ts\n * import { createMockApiData } from '@carlonicora/nextjs-jsonapi/testing';\n *\n * const mockArticle = createMockApiData({\n *   type: 'articles',\n *   id: '1',\n *   attributes: { title: 'Test Article', body: 'Content here' },\n * });\n * ```\n *\n * @example With relationships\n * ```ts\n * const mockArticle = createMockApiData({\n *   type: 'articles',\n *   id: '1',\n *   attributes: { title: 'Test' },\n *   relationships: {\n *     author: { data: { type: 'users', id: '42' } },\n *   },\n * });\n * ```\n */\nexport function createMockApiData(options: CreateMockApiDataOptions): ApiDataInterface {\n  const {\n    type,\n    id = `mock-${type}-${Math.random().toString(36).substring(7)}`,\n    attributes = {},\n    relationships = {},\n    included = [],\n    createdAt = new Date(),\n    updatedAt = new Date(),\n    self,\n  } = options;\n\n  const jsonApiData = {\n    type,\n    id,\n    attributes: {\n      ...attributes,\n      createdAt: createdAt.toISOString(),\n      updatedAt: updatedAt.toISOString(),\n    },\n    relationships,\n  };\n\n  const mockData: ApiDataInterface = {\n    get included() {\n      return included;\n    },\n    get type() {\n      return type;\n    },\n    get id() {\n      return id;\n    },\n    get createdAt() {\n      return createdAt;\n    },\n    get updatedAt() {\n      return updatedAt;\n    },\n    get self() {\n      return self;\n    },\n    get jsonApi() {\n      return jsonApiData;\n    },\n    generateApiUrl: (params?: any) => {\n      const baseUrl = `/${type}/${id}`;\n      if (params) {\n        const searchParams = new URLSearchParams(params);\n        return `${baseUrl}?${searchParams.toString()}`;\n      }\n      return baseUrl;\n    },\n    dehydrate: () => ({\n      jsonApi: jsonApiData,\n      included,\n      allData: [jsonApiData],\n    }),\n    rehydrate: function (_data: any) {\n      return this;\n    },\n    createJsonApi: (data: any) => ({\n      type,\n      id,\n      attributes: data,\n    }),\n    get identifier() {\n      const identifierFields = [\"name\"];\n      return identifierFields\n        .map((field) => attributes[field])\n        .filter((v) => v != null && v !== \"\")\n        .join(\" \");\n    },\n  };\n\n  // Add attribute accessors to the mock object\n  Object.keys(attributes).forEach((key) => {\n    Object.defineProperty(mockData, key, {\n      get: () => attributes[key],\n      enumerable: true,\n    });\n  });\n\n  return mockData;\n}\n\n/**\n * Creates an array of mock ApiDataInterface objects.\n *\n * @example\n * ```ts\n * import { createMockApiDataList } from '@carlonicora/nextjs-jsonapi/testing';\n *\n * const mockArticles = createMockApiDataList('articles', 5, (index) => ({\n *   title: `Article ${index + 1}`,\n * }));\n * ```\n */\nexport function createMockApiDataList(\n  type: string,\n  count: number,\n  attributesFactory?: (index: number) => Record<string, any>,\n): ApiDataInterface[] {\n  return Array.from({ length: count }, (_, index) =>\n    createMockApiData({\n      type,\n      id: `${index + 1}`,\n      attributes: attributesFactory?.(index) ?? {},\n    }),\n  );\n}\n","import { expect } from \"vitest\";\n\ninterface JsonApiResponse {\n  data?:\n    | {\n        type?: string;\n        id?: string;\n        attributes?: Record<string, any>;\n        relationships?: Record<string, any>;\n      }\n    | Array<{\n        type?: string;\n        id?: string;\n        attributes?: Record<string, any>;\n        relationships?: Record<string, any>;\n      }>;\n}\n\n/**\n * Custom Vitest matchers for JSON:API assertions.\n *\n * @example\n * ```ts\n * import { jsonApiMatchers } from '@carlonicora/nextjs-jsonapi/testing';\n * import { expect } from 'vitest';\n *\n * expect.extend(jsonApiMatchers);\n *\n * // Then use in tests:\n * expect(response).toBeValidJsonApi();\n * expect(response).toHaveJsonApiType('articles');\n * expect(response).toHaveJsonApiAttribute('title', 'My Article');\n * expect(response).toHaveJsonApiRelationship('author');\n * ```\n */\nexport const jsonApiMatchers = {\n  /**\n   * Asserts that the response has a valid JSON:API structure with type and id.\n   */\n  toBeValidJsonApi(received: JsonApiResponse) {\n    const data = Array.isArray(received?.data) ? received.data[0] : received?.data;\n    const hasType = typeof data?.type === \"string\" && data.type.length > 0;\n    const hasId = typeof data?.id === \"string\" && data.id.length > 0;\n    const isValid = hasType && hasId;\n\n    return {\n      pass: isValid,\n      message: () =>\n        isValid\n          ? `Expected response not to be valid JSON:API, but it has type \"${data?.type}\" and id \"${data?.id}\"`\n          : `Expected response to be valid JSON:API with type and id, but got type: ${JSON.stringify(data?.type)}, id: ${JSON.stringify(data?.id)}`,\n    };\n  },\n\n  /**\n   * Asserts that the response data has the expected JSON:API type.\n   */\n  toHaveJsonApiType(received: JsonApiResponse, expectedType: string) {\n    const data = Array.isArray(received?.data) ? received.data[0] : received?.data;\n    const actualType = data?.type;\n    const pass = actualType === expectedType;\n\n    return {\n      pass,\n      message: () =>\n        pass\n          ? `Expected response not to have JSON:API type \"${expectedType}\"`\n          : `Expected response to have JSON:API type \"${expectedType}\", but got \"${actualType}\"`,\n    };\n  },\n\n  /**\n   * Asserts that the response data has an attribute with the expected value.\n   */\n  toHaveJsonApiAttribute(received: JsonApiResponse, attributeName: string, expectedValue?: any) {\n    const data = Array.isArray(received?.data) ? received.data[0] : received?.data;\n    const attributes = data?.attributes ?? {};\n    const hasAttribute = attributeName in attributes;\n    const actualValue = attributes[attributeName];\n\n    if (expectedValue === undefined) {\n      // Just check existence\n      return {\n        pass: hasAttribute,\n        message: () =>\n          hasAttribute\n            ? `Expected response not to have JSON:API attribute \"${attributeName}\"`\n            : `Expected response to have JSON:API attribute \"${attributeName}\", but it was not found. Available attributes: ${Object.keys(attributes).join(\", \") || \"none\"}`,\n      };\n    }\n\n    const valuesMatch = actualValue === expectedValue;\n    return {\n      pass: hasAttribute && valuesMatch,\n      message: () =>\n        hasAttribute && valuesMatch\n          ? `Expected response not to have JSON:API attribute \"${attributeName}\" with value \"${expectedValue}\"`\n          : !hasAttribute\n            ? `Expected response to have JSON:API attribute \"${attributeName}\", but it was not found`\n            : `Expected JSON:API attribute \"${attributeName}\" to be \"${expectedValue}\", but got \"${actualValue}\"`,\n    };\n  },\n\n  /**\n   * Asserts that the response data has the specified relationship.\n   */\n  toHaveJsonApiRelationship(received: JsonApiResponse, relationshipName: string) {\n    const data = Array.isArray(received?.data) ? received.data[0] : received?.data;\n    const relationships = data?.relationships ?? {};\n    const hasRelationship = relationshipName in relationships;\n\n    return {\n      pass: hasRelationship,\n      message: () =>\n        hasRelationship\n          ? `Expected response not to have JSON:API relationship \"${relationshipName}\"`\n          : `Expected response to have JSON:API relationship \"${relationshipName}\", but it was not found. Available relationships: ${Object.keys(relationships).join(\", \") || \"none\"}`,\n    };\n  },\n\n  /**\n   * Asserts that the response data array has the expected length.\n   */\n  toHaveJsonApiLength(received: JsonApiResponse, expectedLength: number) {\n    const data = received?.data;\n    const isArray = Array.isArray(data);\n    const actualLength = isArray ? data.length : data ? 1 : 0;\n    const pass = actualLength === expectedLength;\n\n    return {\n      pass,\n      message: () =>\n        pass\n          ? `Expected response not to have ${expectedLength} items`\n          : `Expected response to have ${expectedLength} items, but got ${actualLength}`,\n    };\n  },\n};\n\n// Type declarations for the custom matchers\ndeclare module \"vitest\" {\n  interface Assertion<T = any> {\n    toBeValidJsonApi(): T;\n    toHaveJsonApiType(expectedType: string): T;\n    toHaveJsonApiAttribute(attributeName: string, expectedValue?: any): T;\n    toHaveJsonApiRelationship(relationshipName: string): T;\n    toHaveJsonApiLength(expectedLength: number): T;\n  }\n  interface AsymmetricMatchersContaining {\n    toBeValidJsonApi(): any;\n    toHaveJsonApiType(expectedType: string): any;\n    toHaveJsonApiAttribute(attributeName: string, expectedValue?: any): any;\n    toHaveJsonApiRelationship(relationshipName: string): any;\n    toHaveJsonApiLength(expectedLength: number): any;\n  }\n}\n\n/**\n * Extends Vitest's expect with JSON:API matchers.\n * Call this in your test setup file.\n *\n * @example\n * ```ts\n * // vitest.setup.ts\n * import { extendExpectWithJsonApiMatchers } from '@carlonicora/nextjs-jsonapi/testing';\n *\n * extendExpectWithJsonApiMatchers();\n * ```\n */\nexport function extendExpectWithJsonApiMatchers(): void {\n  expect.extend(jsonApiMatchers);\n}\n","\"use client\";\n\nimport React, { ReactElement } from \"react\";\nimport { render, RenderOptions, RenderResult } from \"@testing-library/react\";\nimport {\n  MockJsonApiProvider,\n  MockJsonApiProviderProps as _MockJsonApiProviderProps,\n} from \"../providers/MockJsonApiProvider\";\nimport { JsonApiConfig } from \"../../client/context/JsonApiContext\";\n\nexport interface RenderWithProvidersOptions extends Omit<RenderOptions, \"wrapper\"> {\n  /**\n   * Custom JSON:API configuration to pass to the mock provider.\n   */\n  jsonApiConfig?: Partial<JsonApiConfig>;\n\n  /**\n   * Additional wrapper component to wrap around the providers.\n   */\n  wrapper?: React.ComponentType<{ children: React.ReactNode }>;\n}\n\n/**\n * Renders a component wrapped with all necessary providers for testing.\n *\n * @example\n * ```tsx\n * import { renderWithProviders } from '@carlonicora/nextjs-jsonapi/testing';\n *\n * const { getByText } = renderWithProviders(<MyComponent />);\n * expect(getByText('Hello')).toBeInTheDocument();\n * ```\n *\n * @example With custom config\n * ```tsx\n * const { getByText } = renderWithProviders(<MyComponent />, {\n *   jsonApiConfig: { apiUrl: 'https://custom.api.com' },\n * });\n * ```\n *\n * @example With additional wrapper\n * ```tsx\n * const CustomWrapper = ({ children }) => (\n *   <ThemeProvider>{children}</ThemeProvider>\n * );\n *\n * const { getByText } = renderWithProviders(<MyComponent />, {\n *   wrapper: CustomWrapper,\n * });\n * ```\n */\nexport function renderWithProviders(ui: ReactElement, options: RenderWithProvidersOptions = {}): RenderResult {\n  const { jsonApiConfig, wrapper: AdditionalWrapper, ...renderOptions } = options;\n\n  function AllProviders({ children }: { children: React.ReactNode }) {\n    const content = <MockJsonApiProvider config={jsonApiConfig}>{children}</MockJsonApiProvider>;\n\n    if (AdditionalWrapper) {\n      return <AdditionalWrapper>{content}</AdditionalWrapper>;\n    }\n\n    return content;\n  }\n\n  return render(ui, { wrapper: AllProviders, ...renderOptions });\n}\n\n/**\n * Re-export render utilities from Testing Library for convenience.\n */\nexport { render, screen, waitFor, fireEvent, within } from \"@testing-library/react\";\nexport { userEvent } from \"@testing-library/user-event\";\n"],"mappings":";;;;;;;;AAkDS;AAxCT,IAAM,oBAAmC;AAAA,EACvC,QAAQ;AAAA,EACR,aAAa,mCAAY,0BAAZ;AAAA,EACb,gBAAgB,mCAAY,MAAZ;AAAA,EAChB,gBAAgB,CAAC;AAAA,EACjB,SAAS,6BAAM;AAAA,EAAC,GAAP;AAAA,EACT,aAAa;AAAA,IACX,gBAAgB;AAAA,EAClB;AACF;AAyBO,SAAS,oBAAoB,EAAE,UAAU,OAAO,GAA6B;AAClF,QAAM,eAA8B;AAAA,IAClC,GAAG;AAAA,IACH,GAAG;AAAA,EACL;AAEA,SAAO,oBAAC,eAAe,UAAf,EAAwB,OAAO,cAAe,UAAS;AACjE;AAPgB;;;AC1BT,SAAS,iBAAiB,SAA+D;AAAA,EAE9F,MAAM,UAAU;AAAA,IApBlB,OAoBkB;AAAA;AAAA;AAAA,IACd,KAAK;AAAA,IACL,OAAO,QAAQ;AAAA,EACjB;AAEA,SAAO;AAAA,IACL,MAAM,QAAQ;AAAA,IACd,OAAO,QAAQ;AAAA,IACf,YAAY,QAAQ;AAAA,IACpB,OAAO;AAAA,EACT;AACF;AAbgB;;;ACiBT,SAAS,mBAAmB,UAAqC,CAAC,GAAyB;AAChG,QAAM;AAAA,IACJ,OAAO;AAAA,IACP,KAAK;AAAA,IACL,WAAW,KAAK,MAAM;AAAA,IACtB,QAAQ,KAAK,KAAK;AAAA,IAClB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,EACF,IAAI;AAEJ,QAAM,eAAqC;A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