Skip to content

Commit

Permalink
test(account-action-menu): 스토어에 사용자 mock 데이터 저장한다 (#355)
Browse files Browse the repository at this point in the history
  • Loading branch information
leegwae authored and github-actions[bot] committed Aug 17, 2023
1 parent 78cc15e commit 06183ae
Showing 1 changed file with 8 additions and 8 deletions.
16 changes: 8 additions & 8 deletions src/components/home/__tests__/AccountActionMenu.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -20,14 +20,6 @@ vi.mock('react-router-dom', async (importOriginal) => {

describe('AccountActionMenu', () => {
it('사용자 이메일과 닉네임을 보여준다', () => {
act(() => {
setUserState({
email: '이메일',
nickname: '닉네임',
createdAt: new Date().toString(),
});
});

setup();

expect(screen.getByText(/이메일/)).toBeInTheDocument();
Expand Down Expand Up @@ -68,6 +60,14 @@ function setup(): {
accountButton: HTMLElement;
logoutButton: HTMLElement;
} {
act(() => {
setUserState({
email: '이메일',
nickname: '닉네임',
createdAt: new Date().toString(),
});
});

renderWithQueryClient(
<MemoryRouter>
<AccountActionMenu close={handleClose} />
Expand Down

0 comments on commit 06183ae

Please sign in to comment.