Skip to content

Commit

Permalink
test(bezier-react): add test to useIsMounted (channel-io#1776)
Browse files Browse the repository at this point in the history
<!--
  How to write a good PR title:
- Follow [the Conventional Commits
specification](https://www.conventionalcommits.org/en/v1.0.0/).
  - Give as much context as necessary and as little as possible
  - Prefix it with [WIP] while it’s a work in progress
-->

## Self Checklist

- [x] I wrote a PR title in **English** and added an appropriate
**label** to the PR.
- [x] I wrote the commit message in **English** and to follow [**the
Conventional Commits
specification**](https://www.conventionalcommits.org/en/v1.0.0/).
- [x] I [added the
**changeset**](https://github.com/changesets/changesets/blob/main/docs/adding-a-changeset.md)
about the changes that needed to be released. (or didn't have to)
- [x] I wrote or updated **documentation** related to the changes. (or
didn't have to)
- [x] I wrote or updated **tests** related to the changes. (or didn't
have to)
- [x] I tested the changes in various browsers. (or didn't have to)
  - Windows: Chrome, Edge, (Optional) Firefox
  - macOS: Chrome, Edge, Safari, (Optional) Firefox

## Related Issue
<!-- Please link to issue if one exists -->

<!-- Fixes #0000 -->

## Summary
<!-- Please brief explanation of the changes made -->
add test to useIsMounted

## Details
<!-- Please elaborate description of the changes -->
<img width="649" alt="image"
src="https://github.com/channel-io/bezier-react/assets/102217654/d43094be-af70-4066-a2ee-f9e871f8c2da">

### Breaking change? (Yes/No)
<!-- If Yes, please describe the impact and migration path for users -->

## References
<!-- Please list any other resources or points the reviewer should be
aware of -->

---------

Co-authored-by: Yang Wooseong (Andrew) <[email protected]>
  • Loading branch information
SEOKKAMONI and yangwooseong authored Dec 7, 2023
1 parent 84e4bd5 commit fae5a29
Showing 1 changed file with 11 additions and 0 deletions.
11 changes: 11 additions & 0 deletions packages/bezier-react/src/hooks/useIsMounted.test.ts
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
import { renderHook } from '@testing-library/react'

import useIsMounted from './useIsMounted'

describe('useIsMounted', () => {
it('should return true when mounted', () => {
const { result } = renderHook(() => useIsMounted())

expect(result.current).toBe(true)
})
})

0 comments on commit fae5a29

Please sign in to comment.