Skip to content

Commit

Permalink
restore
Browse files Browse the repository at this point in the history
  • Loading branch information
cpcramer committed Aug 8, 2024
1 parent c918e11 commit 3a13224
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 37 deletions.
2 changes: 1 addition & 1 deletion src/components/TransactionWrapper.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ import {
mintReferral,
quantity,
tokenId,
} from '../constants';
} from 'src/constants';
import type { Address, ContractFunctionParameters } from 'viem';
import { parseEther } from 'viem';

Expand Down
38 changes: 3 additions & 35 deletions src/components/WalletWrapper.test.tsx
Original file line number Diff line number Diff line change
@@ -1,42 +1,10 @@
import { render, screen } from '@testing-library/react';
import { render } from '@testing-library/react';
import { describe, expect, it } from 'vitest';
import WalletWrapper from './WalletWrapper';
import { http, WagmiProvider, createConfig } from 'wagmi';
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
import { base } from 'wagmi/chains';
import { mock } from 'wagmi/connectors';

const config = createConfig({
chains: [base],
connectors: [
mock({
accounts: [
'0xf39Fd6e51aad88F6F4ce6aB8827279cffFb92266',
'0x70997970c51812dc3a010c7d01b50e0d17dc79c8',
'0x3C44CdDdB6a900fa2b585dd299e03d12FA4293BC',
],
}),
],
transports: {
[base.id]: http(),
},
});
const queryClient = new QueryClient();

const renderWithProviders = (Component: React.ComponentType) => {
return render(
<WagmiProvider config={config}>
<QueryClientProvider client={queryClient}>
<Component />
</QueryClientProvider>
</WagmiProvider>,
);
};

describe('WalletWrapper', () => {
it('should renders', () => {
renderWithProviders(WalletWrapper);
const wallet = screen.getByTestId('ockConnectWallet_Container');
expect(wallet).toBeInTheDocument();
render(<WalletWrapper />);

Check failure on line 7 in src/components/WalletWrapper.test.tsx

View workflow job for this annotation

GitHub Actions / build (18.x)

src/components/WalletWrapper.test.tsx > WalletWrapper > should renders

ReferenceError: React is not defined ❯ src/components/WalletWrapper.test.tsx:7:12
expect(true).toBeTruthy();
});
});
2 changes: 1 addition & 1 deletion tsconfig.json
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@
"moduleResolution": "bundler",
"resolveJsonModule": true,
"isolatedModules": true,
"jsx": "react-jsx",
"jsx": "preserve",
"incremental": true,
"plugins": [
{
Expand Down

0 comments on commit 3a13224

Please sign in to comment.