Files

30 lines
1.4 KiB
JavaScript
Raw Permalink Normal View History

2026-10-29 11:57:29 +01:00
// Generated, do not edit. sha256:873b90a4bc5945aaec1e66516f50565126971fb28d2a0e30e1d4f91ed16001a1
import { describe, it } from 'node:test';
import assert from 'node:assert/strict';
import { readFileSync } from 'node:fs';
import path from 'node:path';
const WORTEL = path.resolve(import.meta.dirname, '..', '..');
const lees = (...delen) => readFileSync(path.join(WORTEL, ...delen), 'utf8');
const CHART = lees('client', 'wealth', 'chart.js');
const CSS = lees('client', 'css', 'styles.css').replace(/\/\*[\s\S]*?\*\//g, '').replace(/\s+/g, ' ');
const glasLijst = decl => [...CSS.matchAll(/:root\[data-profile="glass"\] :is\(([^)]*)\) \{([^}]*)\}/g)]
.filter(m => m[1].includes('.po-pop') && m[2].includes(decl))
.map(m => m[1]);
describe('de tooltip van de doughnuts', () => {
it('laat Chart.js hem niet op het canvas tekenen', () => {
assert.match(CHART, /tooltip: \{\s*enabled: false,\s*external:/);
});
it('staat bij de zwevende lagen die in Glas matglas worden', () => {
const lijsten = glasLijst('backdrop-filter:blur');
assert.ok(lijsten.length >= 1, 'de glasregel van de zwevende lagen hoort te bestaan');
assert.ok(lijsten.some(l => l.includes('.ring-tip')), '.ring-tip hoort in die lijst');
});
it('zet het bedrag in een .val, zodat de privacystand het vervaagt', () => {
assert.match(CHART, /className = 'val';\s*bedrag\.textContent = fmtBase\(/);
});
});