import {test} from 'node:test' import assert from 'node:assert/strict' import {fitValueFontSize} from '../src/utils/adaptiveValue.ts' test('fits the value to available width without exceeding readable bounds',()=>{ assert.equal(fitValueFontSize(120,100,24,14),24) assert.equal(fitValueFontSize(80,120,24,14),16) assert.equal(fitValueFontSize(20,120,24,14),14) assert.equal(fitValueFontSize(0,120,24,14),24) assert.equal(fitValueFontSize(100,0,24,14),24) })