import assert from 'node:assert/strict'; import {test} from 'node:test'; import {readFileSync} from 'node:fs'; test('planning live scene reuses the canonical vertical height range inside the existing stage',()=>{ const source=readFileSync(new URL('../src/components/missions/PlanningLiveScene.tsx',import.meta.url),'utf8'); assert.match(source,/RangeControl orientation="vertical" limitSide="left" label="Срез"/); assert.match(source,/className="session-overview__height"/); assert.match(source,/ceiling_m:ceilingRef\.current/); assert.match(source,/formatLimit=\{value=>value\.toFixed\(1\)\.replace\('\.',','\)\}/); assert.match(source,/heightBounds=null/); assert.match(source,/const CLIP_CEILING_M=80/); assert.match(source,/max:Math\.max\(CLIP_CEILING_M,sourceBounds\.max,ceiling\?\?-Infinity\)/); assert.match(source,/floor_m:floorRef\.current/); assert.match(source,/value=\{\[floor\?\?rangeBounds\.min,ceiling\?\?rangeBounds\.max\]\}/); assert.match(source,/floorRef\.current=null;setCeiling\(null\);setFloor\(null\);\s*\},\[runId\]\)/); });