⚠ ネタバレ注意: 本サイトはSFアニメ「SOLAR LINE」の内容を詳細に分析しています。未視聴の方はご注意ください。
📝 AI生成コンテンツ: 本考証の大部分は AI(Claude Code 等)によって生成されています。内容の正確性については原作および引用元をご確認ください。

Task 622: Add Regression Test for __prepareScene Regex in Template Output

完了 ← タスク一覧

Task 622: Add Regression Test for __prepareScene Regex in Template Output

Status: DONE

Problem

Task 620 fixed a bug where \d in a template literal was silently converted to d, producing an invalid regex /^episode-(d+)$/ that caused EP01-EP04 inline 3D viewers to fail silently. No unit test caught this because the template literal JS output wasn't validated for correct regex patterns.

Solution

Add a unit test in templates.test.ts that validates the built HTML output from generateViewer3dScript (via renderViewer3D) contains the correct regex pattern /^episode-(\d+)$/ (with proper \d, not d).

Files to Modify