불필요 파일 제거
This commit is contained in:
@@ -1,33 +0,0 @@
|
||||
/* eslint-disable @cspell/spellchecker */
|
||||
/**
|
||||
* 은행에서 사용하는 코드 모음
|
||||
*/
|
||||
|
||||
export type YN = 'Y' | 'N';
|
||||
|
||||
/**
|
||||
* 은행코드
|
||||
*/
|
||||
export const enum BankCode {
|
||||
A = '011',
|
||||
B = '004',
|
||||
}
|
||||
|
||||
/**
|
||||
* 은행이름
|
||||
*/
|
||||
export const enum BankName {
|
||||
A = 'A은행',
|
||||
B = 'B은행',
|
||||
}
|
||||
|
||||
export const enum BankValue {
|
||||
A = 'NHB',
|
||||
B = 'KBB',
|
||||
}
|
||||
|
||||
/**
|
||||
* 은행코드로 어떤 은행인지 확인
|
||||
*/
|
||||
export const isBankA = (bkcd: BankCode) => bkcd === BankCode.A;
|
||||
export const isBankB = (bkcd: BankCode) => bkcd === BankCode.B;
|
||||
@@ -1,9 +0,0 @@
|
||||
/* eslint-disable @cspell/spellchecker */
|
||||
export interface MyWalletQRCode {
|
||||
walletAddr: string;
|
||||
bankCode: string;
|
||||
}
|
||||
|
||||
export interface MyPaymentQRcode extends MyWalletQRCode {
|
||||
exptime: string; // 'YYYY-MM-DD H:m:s';
|
||||
}
|
||||
@@ -1,56 +0,0 @@
|
||||
/* eslint-disable react-refresh/only-export-components */
|
||||
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
||||
import { render, RenderOptions } from '@testing-library/react';
|
||||
import userEvent from '@testing-library/user-event';
|
||||
import { FC, ReactElement, useEffect } from 'react';
|
||||
import { MemoryRouter, Route, Routes } from 'react-router';
|
||||
|
||||
import { RecoilRoot } from 'recoil';
|
||||
import { SubLayout } from '@/widgets/sub-layout';
|
||||
|
||||
const queryClient = new QueryClient({
|
||||
defaultOptions: {
|
||||
queries: {
|
||||
retry: false,
|
||||
throwOnError: true,
|
||||
refetchOnWindowFocus: false,
|
||||
},
|
||||
},
|
||||
});
|
||||
|
||||
interface RouterParams {
|
||||
path?: string;
|
||||
entry?: string;
|
||||
state?: any;
|
||||
}
|
||||
|
||||
const AllTheProviders: FC<{ children: React.ReactNode; routerParams?: RouterParams }> = ({
|
||||
children,
|
||||
routerParams,
|
||||
}) => {
|
||||
const { path = '/', entry = '/', state } = routerParams ?? {};
|
||||
const initialEntry = { pathname: entry, state };
|
||||
useEffect(() => {
|
||||
return () => queryClient.clear();
|
||||
}, []);
|
||||
return (
|
||||
<RecoilRoot>
|
||||
<QueryClientProvider client={queryClient}>
|
||||
<MemoryRouter initialEntries={[initialEntry]}>
|
||||
<Routes>
|
||||
<Route element={<SubLayout />}>
|
||||
<Route path={path} element={<>{children}</>} />
|
||||
</Route>
|
||||
</Routes>
|
||||
</MemoryRouter>
|
||||
</QueryClientProvider>
|
||||
</RecoilRoot>
|
||||
);
|
||||
};
|
||||
const user = userEvent.setup();
|
||||
const customRender = (ui: ReactElement, routerParams?: RouterParams, options?: Omit<RenderOptions, 'wrapper'>) => {
|
||||
return render(ui, { wrapper: (props) => <AllTheProviders {...props} routerParams={routerParams} />, ...options });
|
||||
};
|
||||
|
||||
export * from '@testing-library/react';
|
||||
export { customRender as render, user };
|
||||
Reference in New Issue
Block a user