/** * Dada movement hall must read as a modern cabaret, not a barred cell. * node --test server/__tests__/dada-interior.test.js */ const { describe, it } = require('node:test'); const assert = require('node:assert/strict'); const fs = require('node:fs'); const path = require('node:path'); const ROOT = path.join(__dirname, '..', '..'); const STYLES = fs.readFileSync(path.join(ROOT, 'client/src/data/movement-interior-styles.ts'), 'utf8'); const WINDOWS = fs.readFileSync(path.join(ROOT, 'client/src/components/GalleryWindows.tsx'), 'utf8'); const DETAILS = fs.readFileSync(path.join(ROOT, 'client/src/components/hall-details/modernism.tsx'), 'utf8'); function dadaSalonBlock() { const start = STYLES.indexOf("'dada-salon'"); assert.ok(start >= 0, 'dada-salon style must exist'); const next = STYLES.indexOf('mk(', start + 1); return STYLES.slice(start, next > start ? next : undefined); } function dadaDetailsBlock() { const start = DETAILS.indexOf('export function DadaDetails'); assert.ok(start >= 0, 'DadaDetails must exist'); const next = DETAILS.indexOf('export function ', start + 1); return DETAILS.slice(start, next > start ? next : undefined); } describe('Dada interior — modern cabaret, no prison vibe', () => { it('declares a picture window style (open glass, no iron grid)', () => { assert.match(STYLES, /\| 'picture'/); assert.match(WINDOWS, /style === 'picture'/); }); it('does not use factory or gothic-lancet windows (barred / cell look)', () => { const block = dadaSalonBlock(); assert.doesNotMatch(block, /style: 'factory'/); assert.doesNotMatch(block, /style: 'gothic-lancet'/); assert.match(block, /style: 'picture'/); }); it('uses modern painted surfaces instead of dingy brick cell walls', () => { const block = dadaSalonBlock(); assert.doesNotMatch(block, /wallSide: 'brick'/); assert.match(block, /painted-flat|painted-emulsion/); assert.match(block, /Modern|cabaret|collage/i); }); it('DadaDetails has no service pipe / iron-bar geometry', () => { const block = dadaDetailsBlock(); assert.doesNotMatch(block, /Service pipe|cylinderGeometry/); assert.match(block, /collage|cabaret|panel/i); }); });