Skip to content
This repository has been archived by the owner on Jun 25, 2024. It is now read-only.

[Fix] : 간헐적 test fail 해결 #5

Merged
merged 2 commits into from
Oct 22, 2023
Merged

Conversation

goldentrash
Copy link

@goldentrash goldentrash commented Oct 21, 2023

test DB init 중, 모든 data가 load 완료 될 때 까지 기다리지 않아 간헐적으로 test가 fail하던 문제를 해결했습니다.

mock data를 동기적으로 load하다보니, BurritoStore가 score가 0 미만인 경우 dec 정보를 무시해 다른 test가 연쇄적으로 fail하는 문제가 발생했습니다. 우선 mock data 순서를 변경해 모든 data가 load 가능하도록 임시 조치해뒀습니다.

최대한 현 lint 룰에 맞춰 수정하려 했지만, dependency version up이 필요한 경우과 같은 몇몇 경우는 disable 했습니다.

@goldentrash goldentrash requested a review from a team as a code owner October 21, 2023 18:11
}
} else {
// eslint-disable-next-line no-restricted-syntax
for (const data of mockData) {
Copy link
Author

Choose a reason for hiding this comment

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

기존 mockData.forEach에서 for...of 로의 변경이 주 사항입니다

@goldentrash goldentrash merged commit a31aa93 into develop Oct 22, 2023
2 checks passed
@goldentrash goldentrash deleted the fix/test_getScoreBoard branch October 22, 2023 07:32
Comment on lines +139 to +141

// eslint-disable-next-line import/prefer-default-export
export { init };
Copy link
Member

Choose a reason for hiding this comment

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

이것도 그냥 export default 로 바쒀도 되었을듯?

Copy link
Author

Choose a reason for hiding this comment

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

다른 파일까지 바꿀 엄두가 안 나서.... 지금 lint fail이 너무 많아서 건들기 무서워요

방금 혹시나해서 건드려봤는데 역시 줄줄이 터져서 나중에 하는거로 :)

Comment on lines +13 to +14

const mockData = require('../data/mockData.json');
Copy link
Member

Choose a reason for hiding this comment

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

이 친구는 commonjs 방식 쓴 이유가 있나요? 라고 하기엔 기존 코드 승계구나

Copy link
Member

@l2hyunwoo l2hyunwoo 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 subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants