Skip to content

Commit

Permalink
refactor: 테스트용 유틸 폴더 구조 변경
Browse files Browse the repository at this point in the history
  • Loading branch information
BadaHertz52 committed Oct 16, 2024
1 parent c44f104 commit 195a3fe
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 1 deletion.
1 change: 1 addition & 0 deletions frontend/src/utils/testUtils/index.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1 @@
export { default as testWithAuthCookie } from './testWithAuthCookie';
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
import { MOCK_AUTH_TOKEN_NAME } from '@/mocks/mockData';

export const testWithAuthCookie = async (callback: () => Promise<void> | void) => {
const testWithAuthCookie = async (callback: () => Promise<void> | void) => {
// 쿠키 추가
document.cookie = `${MOCK_AUTH_TOKEN_NAME}=2024-review-me`;

Expand All @@ -11,3 +11,5 @@ export const testWithAuthCookie = async (callback: () => Promise<void> | void) =
document.cookie = `${MOCK_AUTH_TOKEN_NAME}=; max-age=-1`;
}
};

export default testWithAuthCookie;

0 comments on commit 195a3fe

Please sign in to comment.