test: Add unit test coverage for imageFallback utility
メンテナーはふだん 10 日以内に返信
@swastiksharma45 がすでに取り組んでいます。
2026年11月18日 から。
評価
- 難易度
- 2/5
- 見積もり時間
- 1〜3時間
- 初心者へのやさしさ
- 35/100
- issue の種類
- 機能追加
- 明瞭さ
- 明確に書かれている
- 活発さ
- 活発
- 技術スタック
- typescript
- 領域
- testing
調査の方向性
Read frontend/src/utils/imageFallback.ts and the neighboring utility tests under frontend/src/utils/__tests__/. Add frontend/src/utils/__tests__/imageFallback.test.ts to cover the default and custom fallback, loop prevention, and the shared handler. Done means those cases have unit test coverage; the issue author reports the suite, TypeScript typecheck, ESLint, and Prettier already pass locally.
索引モデルが issue の本文から書いたものです。
説明
Describe the feature
The frontend/src/utils/imageFallback.ts utility centralizes error handling for <img> tags across media and memories components to prevent infinite fallback error loops. While other utilities in frontend/src/utils/ have test suites in __tests__/, imageFallback.ts currently has no test coverage.
Proposed Solution
Add a dedicated unit test suite at frontend/src/utils/__tests__/imageFallback.test.ts covering:
- Default fallback: verifying
createImageErrorHandler()swapsimg.srctoPLACEHOLDER_IMAGE_SRC. - Custom fallback: verifying custom placeholder strings when provided to
createImageErrorHandler(customSrc). - Loop prevention: verifying that
img.onerroris set tonullupon error to detach the listener and prevent infinite retry loops. - Shared handler: verifying the exported
handlePlaceholderImageErrorsingleton.
I have already implemented and verified this test suite locally (5 tests passing, TypeScript typecheck passing, and ESLint / Prettier clean).
Could you please assign this to me so I can open the PR?
Record
- I agree to follow this project's Code of Conduct
- I want to work on this issue
- 主要言語
- Python
- スター
- 320
- フォーク
- 771
- 平均マージ
- 9日 5時間
- マージ済み PR(30日)
- 15
環境構築
- Dockerfile・Docker Compose ファイルなし
- プルリクエストのテンプレートなし
- コントリビューションガイドを読む
はじめの一歩
- issue を最後まで読み、次にプロジェクトのコントリビューションガイドを読みます。
- 着手することを issue にコメントします — 二人が同じ作業をするのを防げます。
- リポジトリをフォークし、ブランチを切って変更します。
- issue 番号を参照したプルリクエストを送ります。
AOSSIE-Org/PictoPy のほかの issue
-
BUG: Add images to album: success message shows requested count, not number actually added対応中かも @avika269 が 3 日前に担当しました。 オープンbug enhancement
難易度 2/5 1〜3時間 初心者へのやさしさ 84/100
AOSSIE-Org/PictoPy#1740 · コメント 2 件 ·
メンテナーはふだん 10 日以内に返信
-
BUG: /sync-folder does not validate the supplied folder_id対応中かも @sathvikn113 が 4 日前に担当しました。 オープンbug possible-duplicate
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
AOSSIE-Org/PictoPy#1731 · コメント 5 件 ·
メンテナーはふだん 10 日以内に返信
-
DOC: update deprecated libgl1-mesa-glx package and stale setup.md references対応中かも @avika269 が 4 日前に担当しました。 オープンdocumentation
難易度 1/5 1〜3時間 初心者へのやさしさ 65/100
AOSSIE-Org/PictoPy#1730 · コメント 5 件 ·
メンテナーはふだん 10 日以内に返信
-
bug possible-duplicate
難易度 2/5 1〜3時間 初心者へのやさしさ 72/100
AOSSIE-Org/PictoPy#1729 · コメント 4 件 ·
メンテナーはふだん 10 日以内に返信
-
BUG: Memory curator misses upcoming anniversaries across year boundaries and on leap days対応中かも @akhilmodi29 が 5 日前に担当しました。 オープンbug possible-duplicate
難易度 2/5 1〜3時間 初心者へのやさしさ 83/100
AOSSIE-Org/PictoPy#1725 · コメント 4 件 ·
メンテナーはふだん 10 日以内に返信
AOSSIE-Org/PictoPy の issue をすべて見る
似ている issue
-
needs-triage
難易度 2/5 1〜3時間 初心者へのやさしさ 78/100
gke-labs/kube-agents#6778 · コメント 1 件 ·
メンテナーはふだん 1 日以内に返信
-
Declare the CMS schema library in the optional recipients extra対応中かも このイシューにリンクされたプルリクエストがオープン中、またはマージ済みです。 オープンarea:python in-progress
難易度 2/5 1〜3時間 初心者へのやさしさ 82/100
yhay81/pyropdf#1005 · コメント 2 件 ·
メンテナーはふだん 1 日以内に返信
-
area/build-framework kind/enhancement priority/low
難易度 2/5 1〜3時間 初心者へのやさしさ 77/100
yugabyte/yugabyte-db#38826 ·
メンテナーはふだん 1 日以内に返信
-
難易度 2/5 1〜3時間 初心者へのやさしさ 73/100
メンテナーはふだん 1 日以内に返信
-
難易度 1/5 1〜3時間 初心者へのやさしさ 72/100
sususweet/midea_auto_cloud#306 ·
メンテナーはふだん 9 日以内に返信