fix: Remove unused files

This commit is contained in:
abdus committed 2026-10-10 13:02:19 +02:00
1 parent 9d65dc3184
commit 766212f119
10 files changed
+7 -201

No files matched your search

+1 -1
View File
@@ -25,7 +25,7 @@ test('Standard preserves lowercase lettering and the familiar FIGlet shape', ()
});
test('old lowercase font links resolve to their library names', () => {
for (const [name, expected] of [['standard', 'Standard'], ['slant', 'Slant'], ['block', 'Block'], ['banner', 'Banner'], ['compact', 'compact'], ['unknown', 'Standard']]) {
for (const [name, expected] of [['standard', 'Standard'], ['slant', 'Slant'], ['block', 'Block'], ['banner', 'Banner'], ['compact', 'Standard'], ['unknown', 'Standard']]) {
assert.equal(resolveFont(name), expected);
}
});
-47
View File
@@ -1,47 +0,0 @@
import test from 'node:test';
import assert from 'node:assert/strict';
import {normalizeText, render, styles} from '../bitmap.js';
test('compact lettering renders a known phrase with correct spacing', () => {
assert.equal(render('HI', 'compact'), [
'# # #####', '# # #', '# # #', '##### #',
'# # #', '# # #', '# # #####',
].join('\n'));
});
for (const style of styles) {
test(`${style} renders digits, punctuation and multiline input`, () => {
const first = render('Hello 123!', style);
assert.equal(first.split('\n').length, 7);
assert.match(first, /\S/);
assert.equal(render('Hello 123!\r\nWorld?', style), `${first}\n\n${render('World?', style)}`);
});
}
for (const [text, expected] of [
['çığöşü İ', 'CIGOSU I'],
['café', 'CAFE'],
['abc 123!?', 'ABC 123!?'],
]) {
test(`normalizes ${text}`, () => assert.equal(normalizeText(text), expected));
}
test('unsupported characters have a visible fallback', () => {
assert.equal(render('🙂'), render('?'));
});
test('all printable ASCII characters have distinct supported glyphs', () => {
for (let code = 32; code <= 126; code++) {
const char = String.fromCharCode(code);
if (char === '?') continue;
assert.notEqual(render(char), render('?'), `missing ${char}`);
}
});
test('banner uses the original normalized letter as ink', () => {
assert.match(render('a', 'banner'), /^ AAA\n/);
assert.doesNotMatch(render('a', 'banner'), /#/);
});
test('rejects invalid styles and overlong text', () => {
assert.throws(() => render('hello', 'unknown'), /Unknown/);
assert.throws(() => render('x'.repeat(501)), /too long/);
assert.doesNotThrow(() => render('x'.repeat(500)));
});
+1 -1
View File
@@ -70,7 +70,7 @@ for (const scope of ['https://ascii.example/', 'https://ascii.example/pwa/']) {
}
assert.equal(sw.claimed, true);
assert.equal(sw.activated, false, 'initial install does not force activation');
assert.equal((await sw.request(`${scope}?text=Hello&font=compact`)).url, scope);
assert.equal((await sw.request(`${scope}?text=Hello&font=Standard`)).url, scope);
assert.equal((await sw.request(`${scope}index.html?text=World`)).url, scope);
for (const cache of sw.stores.values()) {
for (const url of cache.keys()) {