fix(core): Implemented, fixes #1

This commit is contained in:
2025-01-14 17:34:16 +01:00
parent 656f5b7dfb
commit f065ef0e94
13 changed files with 9880 additions and 123 deletions

View File

@@ -1,8 +1,31 @@
import { expect, tap } from 'tapbundle';
import * as beautyfiglet from '../ts/index';
import { expect, tap } from '@push.rocks/tapbundle';
import * as beautyfiglet from '../ts/index.js';
tap.test('first test', async () => {
console.log(beautyfiglet.standardExport);
let testFiglet: typeof beautyfiglet.BeautyFiglet;
tap.test('setup', async () => {
testFiglet = beautyfiglet.BeautyFiglet;
expect(testFiglet).toBeTruthy();
});
tap.start();
tap.test('should render text with the default font', async () => {
const text = "Hello, World!";
const result = await testFiglet.renderDefault(text);
expect(result).toBeTruthy();
});
tap.test('should render text with a specific font', async () => {
const text = "Fancy Text";
const font = "Ghost";
const result = await testFiglet.renderText(text, font);
expect(result).toBeTruthy();
});
tap.test('should list available fonts', async () => {
const fonts = await testFiglet.listFonts();
expect(Array.isArray(fonts)).toBeTrue();
expect(fonts.length).toBeGreaterThan(0);
expect(fonts).toContain("Standard"); // Ensure "Standard" is in the font list
});
tap.start();