Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. Weโ€™ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mock refactor #94

Closed
wants to merge 6 commits into from
Closed

Mock refactor #94

wants to merge 6 commits into from

Conversation

seonghunYang
Copy link
Collaborator

๐Ÿ“Œ ์ž‘์—… ๋‚ด์šฉ

๊ตฌํ˜„ ๋‚ด์šฉ ๋ฐ ์ž‘์—… ํ–ˆ๋˜ ๋‚ด์—ญ

  • mock ๊ด€๋ จ ์ฝ”๋“œ๋ฅผ ๋ฆฌํŒฉํ„ฐ๋ง ํ–ˆ์Šต๋‹ˆ๋‹ค.
  • action์„ ๋„๋ฉ”์ธ ๋ณ„๋กœ ๋ถ„๋ฆฌํ•˜์˜€๊ณ , action๊ณผ db์˜ ์ˆœํ™˜ ์ฐธ์กฐ๋ฅผ ํ•ด๊ฒฐํ•˜๊ณ ์ž ์„œ๋กœ ๋ถ„๋ฆฌํ–ˆ์Šต๋‹ˆ๋‹ค
  • ์ดˆ๊ธฐ ์„ธํŒ…์„ ์œ„ํ•ด ํ–ˆ๋˜ ์ฝ”๋“œ๋“ค์„ ์‚ญ์ œํ–ˆ์Šต๋‹ˆ๋‹ค (invoice ๋„๋ฉ”์ธ)

Copy link

github-actions bot commented May 2, 2024

Copy link
Member

@gahyuun gahyuun left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

๊ณ ์ƒํ•˜์…จ์Šต๋‹ˆ๋‹ค

signIn: (userData: SignInRequestBody) => boolean;
getUserInfo: (authId: string) => UserInfoResponse;
};
type MockDatabaseAction = MockUserACtion & MockLectureAction & MockResultAction;
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Suggested change
type MockDatabaseAction = MockUserACtion & MockLectureAction & MockResultAction;
type MockDatabaseAction = MockUserAction & MockLectureAction & MockResultAction;

์˜คํƒ€์žˆ๋„ค์š”!

Comment on lines +40 to +48
function initStore(): MockDatabaseState {
return JSON.parse(JSON.stringify(initialState));
}

export let mockDatabaseStore = initStore();

export const resetMockDB = () => {
mockDatabaseStore = initStore();
};
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

db.mock.ts๊ฐ€ ์•„๋‹ˆ๋ผ data ํด๋”์— ์žˆ๋Š” ์ด์œ ๊ฐ€ ๋”ฐ๋กœ ์žˆ์„๊นŒ์š”?

Copy link
Member

@yougyung yougyung left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

์ˆ˜๊ณ ํ•˜์…จ์Šต๋‹ˆ๋‹ค ๐Ÿ‘

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants