import test from 'node:test'; import assert from 'node:assert/strict'; import { readFileSync } from 'node:fs'; const source = (path) => readFileSync(new URL(`../${path}`, import.meta.url), 'utf8'); test('#582 camera movement switches the day-cycle shadow to a stage-bounded scene', () => { const helper = source('src/render/paper-scene.ts'); const card = source('src/houseplan-card.ts'); const staticRender = source('src/space-render.ts'); const styles = source('src/styles/plan.styles.ts'); assert.match(helper, /function renderPaperShapes/); assert.match(helper, /pointer-events="none"/); assert.match(card, /dayCycle && paperShapes\.length \? svg` { const card = source('src/houseplan-card.ts'); const styles = source('src/styles/plan.styles.ts'); const staticCard = source('src/space-card.ts'); assert.match(card, / \.hp-paper-outline-svg \{[\s\S]*?z-index:\s*0;/); assert.match(styles, /\.hp-static-stage\.daycycle \.hp-paper-outline-svg/); assert.match(styles, /\.hp-static-stage\.daycycle \.hp-paperg \{[\s\S]*?filter:\s*none;[\s\S]*?will-change:\s*auto;/); });