/* eslint-disable */ import React from 'react'; import { render } from '@testing-library/react'; import App from '../pages/_app'; import '@testing-library/jest-dom/extend-expect'; import { useQuery } from 'react-query'; function useCustomHook() { return useQuery('customHook', () => 'Success'); } const TestComponent = () => { const result = useCustomHook(); return ( <>

This is a test

{result.data ?

React Query Injected

: null} ); }; const testProps = { abc: 'test' }; describe('Root App rendering check', () => { test('should render

element correctly', () => { const { getByText } = render( ); expect(getByText('This is a test')).toBeInTheDocument(); }); test('Testing React query injection', async () => { const { getByText } = render( ); expect(getByText('React Query Injected')).toBeInTheDocument(); }); });