import assert from 'node:assert/strict'; import {readFileSync} from 'node:fs'; import {test} from 'node:test'; const main=readFileSync(new URL('../src/main.ts',import.meta.url),'utf8'),html=readFileSync(new URL('../index.html',import.meta.url),'utf8'),css=readFileSync(new URL('../src/style.css',import.meta.url),'utf8'); test('sliding has an explicit handle target, keyboard alternative and enabled local clipping',()=>{ assert.match(main,/renderer.localClippingEnabled\s*=\s*true/); assert.match(main,/subjectDrag:/);assert.match(main,/intersectPlane/);assert.match(main,/cameraController.hold\(\)/); assert.match(main,/blenderFrame.setOpen\(effective/);assert.match(main,/meshRenderer.setSlide\(-uniforms.uPaneSize.value.x\*effective/); assert.match(html,/id="door-toggle"/);assert.match(html,/id="door-handle"/);assert.match(css,/#door-handle[^}]*width:\s*44px/); assert.match(main,/event.key==='Home'/);assert.match(main,/event.key==='End'/); }); test('A, comparison and booth explicitly use a closed diagnostic view without discarding B openness',()=>{ assert.match(main,/selectedRenderer==='b'&&!comparisonRequested/); assert.match(main,/blenderFrame.isWood&&blenderFrame.isReady/); assert.match(main,/A·B 비교.*닫힌/);assert.match(main,/A 진단.*닫힌/); assert.doesNotMatch(main,/petDepth.position.x\s*=.*door|pet.position.x\s*=.*door/); });