-
Notifications
You must be signed in to change notification settings - Fork 1
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
Mock refactor #94
Conversation
โฆk.ts to lecture-handler.mock.ts
๐storybook: https://65ccb85d5afe55a024495bc0-xguuicjown.chromatic.com/ |
There was a problem hiding this 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; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
type MockDatabaseAction = MockUserACtion & MockLectureAction & MockResultAction; | |
type MockDatabaseAction = MockUserAction & MockLectureAction & MockResultAction; |
์คํ์๋ค์!
function initStore(): MockDatabaseState { | ||
return JSON.parse(JSON.stringify(initialState)); | ||
} | ||
|
||
export let mockDatabaseStore = initStore(); | ||
|
||
export const resetMockDB = () => { | ||
mockDatabaseStore = initStore(); | ||
}; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
db.mock.ts๊ฐ ์๋๋ผ data ํด๋์ ์๋ ์ด์ ๊ฐ ๋ฐ๋ก ์์๊น์?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
์๊ณ ํ์ จ์ต๋๋ค ๐
๐ ์์ ๋ด์ฉ