import assert from 'node:assert/strict'; import { readFile } from 'node:fs/promises'; const shader = await readFile(new URL('../src/shaders/mosaic.frag', import.meta.url), 'utf8'); const paletteShader = await readFile(new URL('../src/shaders/region-palette.frag', import.meta.url), 'utf8'); const historyShader = await readFile(new URL('../src/shaders/region-history.frag', import.meta.url), 'utf8'); const main = await readFile(new URL('../src/main.ts', import.meta.url), 'utf8') + await readFile(new URL('../src/rendering/OriginalGlassRenderer.ts',import.meta.url),'utf8'); const html = await readFile(new URL('../index.html', import.meta.url), 'utf8'); assert.match(main, /uGridSize: \{ value: GOBANG_GLASS.grid \}/); assert.match(main, /uStrength: \{ value: 1 \}/); assert.match(main, /uRegionStrength: \{ value: 0 \}/); assert.match(main, /uCurvature: \{ value: 1 \}/); assert.match(main, /uRegionPaletteSize: \{ value: new THREE\.Vector2\(65, 13\) \}/); assert.match(main, /new THREE\.WebGLRenderTarget\(65, 13/); assert.match(main, /paletteWidth = gridX \* 5/); assert.match(html, /id="grid-size" type="range" min="10" max="24" step="1" value="20"/); assert.match(html, /