/** * Copyright 2026, Optimizely * * Licensed under the Apache License, Version 2.0 (the "License"); * you may not use this file except in compliance with the License. * You may obtain a copy of the License at * * https://www.apache.org/licenses/LICENSE-2.0 * * Unless required by applicable law or agreed to in writing, software * distributed under the License is distributed on an "AS IS" BASIS, * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. * See the License for the specific language governing permissions and * limitations under the License. */ import React from 'react'; import { ProviderStateStore } from '../provider'; import type { OptimizelyUserContext, OptimizelyDecision, Client } from '@optimizely/optimizely-sdk'; export declare const MOCK_DECISION: OptimizelyDecision; export declare const MOCK_DECISIONS: Record; /** * Creates a mock OptimizelyUserContext with all methods stubbed. * Override specific methods via the overrides parameter. */ export declare function createMockUserContext(overrides?: Partial>): OptimizelyUserContext; /** * Creates a mock Optimizely Client. * @param hasConfig - If true, getOptimizelyConfig returns a config object; otherwise null. */ export declare function createMockClient(hasConfig?: boolean): Client; /** * Creates a mock client with notification center support and wraps it in OptimizelyProvider. * Used for integration-style tests that need the full Provider lifecycle. */ export declare function createProviderWrapper(mockUserContext: OptimizelyUserContext): { wrapper: ({ children }: { children: React.ReactNode; }) => React.JSX.Element; client: Client; fireConfigUpdate: () => void | undefined; }; /** * Creates a lightweight wrapper that provides OptimizelyContext directly * (bypassing Provider lifecycle). Used for unit tests. */ export declare function createWrapper(store: ProviderStateStore, client: Client): ({ children }: { children: React.ReactNode; }) => React.JSX.Element;