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

test(react-image): add test code for SuspenseImage #999

Merged
merged 6 commits into from
Jun 28, 2024

Conversation

saul-atomrigs
Copy link
Contributor

Overview

  • Added test code for SuspenseImage.tsx in react-image.
Captura de pantalla 2024-06-28 a las 10 39 23 a  m

PR Checklist

  • [✅] I did below actions if need
  1. I read the Contributing Guide
  2. I added documents and tests.

Copy link

changeset-bot bot commented Jun 28, 2024

🦋 Changeset detected

Latest commit: 40f0a91

The changes in this PR will be included in the next version bump.

This PR includes changesets to release 1 package
Name Type
@suspensive/react-image Patch

Not sure what this means? Click here to learn what changesets are.

Click here if you're a maintainer who wants to add another changeset to this PR

Copy link

vercel bot commented Jun 28, 2024

The latest updates on your projects. Learn more about Vercel for Git ↗︎

Name Status Preview Comments Updated (UTC)
suspensive.org ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 28, 2024 5:03am
v1.suspensive.org ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 28, 2024 5:03am
visualization.suspensive.org ✅ Ready (Inspect) Visit Preview 💬 Add feedback Jun 28, 2024 5:03am

Copy link
Member

@manudeli manudeli left a comment

Choose a reason for hiding this comment

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

How about this

Comment on lines 15 to 17
// @ts-expect-error: non-string src value for testing purposes
render(<SuspenseImage src={123} alt="Test Image" />)
}).toThrow('Image of @suspensive/react-image requires src')
Copy link
Member

@manudeli manudeli Jun 28, 2024

Choose a reason for hiding this comment

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

Suggested change
// @ts-expect-error: non-string src value for testing purposes
render(<SuspenseImage src={123} alt="Test Image" />)
}).toThrow('Image of @suspensive/react-image requires src')
// @ts-expect-error: non-string src value for testing purposes
render(<SuspenseImage src={123} alt="Test Image" />)
}).toThrow('<SuspenseImage/> of @suspensive/react-image requires string src')

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Looks great! I've applied the change to SuspenseImage and its test file :))

@codecov-commenter
Copy link

codecov-commenter commented Jun 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 87.33%. Comparing base (8e7e260) to head (40f0a91).

Additional details and impacted files

Impacted file tree graph

@@            Coverage Diff             @@
##             main     #999      +/-   ##
==========================================
+ Coverage   80.88%   87.33%   +6.44%     
==========================================
  Files          38       38              
  Lines         450      450              
  Branches       98       98              
==========================================
+ Hits          364      393      +29     
+ Misses         77       54      -23     
+ Partials        9        3       -6     
Components Coverage Δ
@suspensive/react 97.03% <ø> (ø)
@suspensive/react-query ∅ <ø> (∅)
@suspensive/react-query-4 0.00% <ø> (ø)
@suspensive/react-query-5 0.00% <ø> (ø)
@suspensive/react-await 100.00% <ø> (ø)
@suspensive/react-image 80.39% <100.00%> (+56.86%) ⬆️

Copy link

codspeed-hq bot commented Jun 28, 2024

CodSpeed Performance Report

Merging #999 will create unknown performance changes

Comparing saul-atomrigs:test/react-image/SuspenseImage (40f0a91) with main (8e7e260)

Summary

⚠️ No benchmarks were detected in both the base of the PR and the PR.

Copy link
Member

@manudeli manudeli left a comment

Choose a reason for hiding this comment

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

Cool! Thanks! 👍

@manudeli manudeli merged commit 8862c2a into toss:main Jun 28, 2024
14 checks passed
manudeli pushed a commit that referenced this pull request Jun 28, 2024
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @suspensive/react-image@0.0.15

### Patch Changes

- [#999](#999)
[`8862c2a`](8862c2a)
Thanks [@saul-atomrigs](https://github.com/saul-atomrigs)! -
test(react-image): add test code for `<SuspenseImage/>`

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
manudeli added a commit that referenced this pull request Aug 3, 2024
# Overview

- Added test code for `SuspenseImage.tsx` in `react-image`. 
<img width="373" alt="Captura de pantalla 2024-06-28 a las 10 39 23 a
 m"
src="https://github.com/toss/suspensive/assets/82362278/eea53c08-dc45-4ac3-a62f-59b2aa70ae24">



## PR Checklist

- [✅] 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 <jonghyeon@toss.im>
manudeli added a commit that referenced this pull request Aug 3, 2024
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @suspensive/react-image@0.0.15

### Patch Changes

- [#999](#999)
[`8862c2a`](8862c2a)
Thanks [@saul-atomrigs](https://github.com/saul-atomrigs)! -
test(react-image): add test code for `<SuspenseImage/>`

Co-authored-by: github-actions[bot] <github-actions[bot]@users.noreply.github.com>
manudeli pushed a commit that referenced this pull request Aug 3, 2024
# Overview

- Added test code for `SuspenseImage.tsx` in `react-image`. 
<img width="373" alt="Captura de pantalla 2024-06-28 a las 10 39 23 a
 m"
src="https://github.com/toss/suspensive/assets/82362278/eea53c08-dc45-4ac3-a62f-59b2aa70ae24">



## PR Checklist

- [✅] 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.

---------
manudeli added a commit that referenced this pull request Aug 3, 2024
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @suspensive/react-image@0.0.15

### Patch Changes

- [#999](#999)
[`8862c2a`](8862c2a)
Thanks [@saul-atomrigs](https://github.com/saul-atomrigs)! -
test(react-image): add test code for `<SuspenseImage/>`
manudeli added a commit that referenced this pull request Aug 3, 2024
# Overview

- Added test code for `SuspenseImage.tsx` in `react-image`. 
<img width="373" alt="Captura de pantalla 2024-06-28 a las 10 39 23 a
 m"
src="https://github.com/toss/suspensive/assets/82362278/eea53c08-dc45-4ac3-a62f-59b2aa70ae24">



## PR Checklist

- [✅] 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 <jonghyeon@toss.im>
manudeli added a commit that referenced this pull request Aug 3, 2024
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @suspensive/react-image@0.0.15

### Patch Changes

- [#999](#999)
[`8862c2a`](8862c2a)
Thanks [@saul-atomrigs](https://github.com/saul-atomrigs)! -
test(react-image): add test code for `<SuspenseImage/>`
manudeli added a commit that referenced this pull request Aug 3, 2024
# Overview

- Added test code for `SuspenseImage.tsx` in `react-image`. 
<img width="373" alt="Captura de pantalla 2024-06-28 a las 10 39 23 a
 m"
src="https://github.com/toss/suspensive/assets/82362278/eea53c08-dc45-4ac3-a62f-59b2aa70ae24">



## PR Checklist

- [✅] 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 <jonghyeon@toss.im>
manudeli added a commit that referenced this pull request Aug 3, 2024
This PR was opened by the [Changesets
release](https://github.com/changesets/action) GitHub action. When
you're ready to do a release, you can merge this and the packages will
be published to npm automatically. If you're not ready to do a release
yet, that's fine, whenever you add more changesets to main, this PR will
be updated.


# Releases
## @suspensive/react-image@0.0.15

### Patch Changes

- [#999](#999)
[`8862c2a`](8862c2a)
Thanks [@saul-atomrigs](https://github.com/saul-atomrigs)! -
test(react-image): add test code for `<SuspenseImage/>`
This pull request was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants