fix(core): Implemented, fixes #1
This commit is contained in:
33
test/test.ts
33
test/test.ts
@@ -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();
|
Reference in New Issue
Block a user