Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
test(react): improve
ErrorBoundaryGroup
test code (#1157)
# Overview Hi, I've been looking at the `ErrorBoundaryGroup` test code and trying to improve it. - I changed `Throw.reset()` to be managed by `beforeEach`. - `useErrorBoundaryGroup` related tests only have tests that fail. I add success case. **Question** [Related Code](https://github.com/toss/suspensive/blob/cbbb6ffe649cfd4442da5fcf55e92d0afdf0fb3c/packages/utils/src/test-utils/index.tsx#L4-L26) The `current` value of `isNeedThrowGlobal` used by the `Throw` object doesn't seem to change. There doesn't seem to be anything currently happening that would cause `isNeedThrowGlobal.current = true`. <img width="1142" alt="스크린샷 2024-07-28 오후 6 54 04" src="https://github.com/user-attachments/assets/7d3b874a-2407-4684-98f6-7c6638b8d79a"> So the absence of `Throw.reset()` in the current test doesn't seem to change the result of the test. Was this code added for safety? Thanks. 🙇♂️ <!-- A clear and concise description of what this pr is about. --> ## PR Checklist - [x] I did below actions if need 1. I read the [Contributing Guide](https://github.com/toss/suspensive/blob/main/CONTRIBUTING.md) 2. I added documents and tests. Co-authored-by: Jonghyeon Ko <[email protected]>
- Loading branch information