testProducts: {
    CONSUMABLE: {
        id: string;
        platform: Platform;
        type: ProductType;
    };
    CONSUMABLE_FAILING: {
        id: string;
        platform: Platform;
        type: ProductType;
    };
    NON_CONSUMABLE: {
        id: string;
        platform: Platform;
        type: ProductType;
    };
    PAID_SUBSCRIPTION: {
        id: string;
        platform: Platform;
        type: ProductType;
    };
    PAID_SUBSCRIPTION_ACTIVE: {
        id: string;
        platform: Platform;
        type: ProductType;
    };
} = ...

Definition of the test products.

Type declaration

  • CONSUMABLE: {
        id: string;
        platform: Platform;
        type: ProductType;
    }

    A valid consumable product.

    • id: "test-consumable"
    • type: ProductType.CONSUMABLE
  • CONSUMABLE_FAILING: {
        id: string;
        platform: Platform;
        type: ProductType;
    }

    A consumable product for which the purchase will always fail.

    • id: "test-consumable-fail"
    • type: ProductType.CONSUMABLE
  • NON_CONSUMABLE: {
        id: string;
        platform: Platform;
        type: ProductType;
    }

    A valid non-consumable product.

    • id: "test-non-consumable"
    • type: ProductType.NON_CONSUMABLE
  • PAID_SUBSCRIPTION: {
        id: string;
        platform: Platform;
        type: ProductType;
    }

    A paid-subscription that auto-renews for the duration of the session.

    This subscription has a free trial period, that renews every week, 3 times. It then costs $4.99 per month.

    • id: "test-subscription"
    • type: ProductType.PAID_SUBSCRIPTION
  • PAID_SUBSCRIPTION_ACTIVE: {
        id: string;
        platform: Platform;
        type: ProductType;
    }

    A paid-subscription that is already active when the app starts.

    It behaves as if the user subscribed on a different device. It will renew forever.

    • id: "test-subscription-active"
    • type: ProductType.PAID_SUBSCRIPTION