INNER CODE UNIT · TypeScript
consoleSpy
RevenueCat/react-native-purchases · __tests__/alertHelper.test.ts:18
const consoleSpy = jest.spyOn(console, 'error').mockImplementation(() => {});
describe('alertHelper', () => {
beforeEach(() => {
jest.clearAllMocks();
});
afterAll(() => {
consoleSpy.mockRestore();
});
const mockProduct = {
identifier: 'test-product',
title: 'Test Product',
description: 'Test Description',
price: 9.99,
pricePerWeek: 1.4285714285714286,
pricePerMonth: 42.857142857142854,