Skip to content

Commit

Permalink
test: mock.js 파일 분리
Browse files Browse the repository at this point in the history
  • Loading branch information
365kim committed Jun 11, 2021
1 parent 525c7ff commit 5c9b983
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 12 deletions.
13 changes: 13 additions & 0 deletions src/redux/confirmReducer.mock.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
const mockMessage = '하루심바의_쇼핑은_즐거워';

const mockApprove = () => console.log('approve 실행');

export const mockOpenPayload = {
message: mockMessage,
approve: mockApprove,
};

export const mockOpenState = {
isOpen: true,
...mockOpenPayload,
};
13 changes: 1 addition & 12 deletions src/redux/confirmReducer.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,18 +5,7 @@ import {
INITIAL_STATE,
confirmReducer,
} from './confirmReducer';

const mockMessage = '하루심바의_쇼핑은_즐거워';
const mockApprove = () => console.log('approve 실행');

const mockOpenPayload = {
message: mockMessage,
approve: mockApprove,
};
const mockOpenState = {
isOpened: true,
...mockOpenPayload,
};
import { mockOpenPayload, mockOpenState } from './confirmReducer.mock';

describe('confirmReducer 테스트', () => {
/* 컨펌창 열기 */
Expand Down

0 comments on commit 5c9b983

Please sign in to comment.