Repository navigation
一括削除テストの UUID 抽出を実コードの直接 import に切り替える - #78
Merged
Merged
Conversation
test/bulk-delete.test.js の UUID 抽出テストは、カレンダー用と全シフト一覧用の 取り出し処理をテスト内にコピーして検証していた。実コードは collectUuidsByType() に統一され、全シフト一覧の属性も data-shift-uuid から data-uuids に変わったため、コピーは存在しないコードを検証していた。 コピーを削除し、js/modules/shifts.js の collectUuidsByType() を直接 import して検証するようにした。全シフト一覧で特別シフト申請の行が specialUuids に 振り分けられることのテストも追加した。 同じファイルの「削除フロー」のコピー(runBulkDeleteFlow)は、実コードが 無名のイベントハンドラのため import できず、今回は変更していない。 Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
|
Codecov Report✅ All modified and coverable lines are covered by tests. 📢 Thoughts on this report? Let us know! |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
概要
PR #77 の補足に書いた、
test/bulk-delete.test.jsに残っていた旧い UUID 取り出し処理のインラインコピーを解消します。テストコードだけの変更で、アプリの挙動は変わりません。変更内容
extractCalendarUuids)と全シフト一覧用(extractAllShiftsUuids)のインラインコピーを削除しました。js/modules/shifts.jsのcollectUuidsByType()を直接 import して検証します(docs/refactoring/phase-1-test-foundation.mdの方針)。specialUuidsに振り分けられることのテストを追加しました。残っているもの
同じファイルの「削除フロー」のコピー(
runBulkDeleteFlow)は変更していません。実コードはdeleteShiftsByType()を呼ぶようになりましたが、コピーはdeleteMultipleShiftsのモックを呼んだままです。実コード側が無名のイベントハンドラで import できないため、ハンドラの切り出しが必要です。テスト
npm test: 430 passed(33 suites)🤖 Generated with Claude Code