Initial commit: pokebuddy_cli

This commit is contained in:
Felipe Domingues 2026-04-25 23:14:38 -03:00
commit d58df9bd10
47 changed files with 1684 additions and 0 deletions

22
test/smoke.test.js Normal file
View file

@ -0,0 +1,22 @@
import test from 'node:test';
import assert from 'node:assert/strict';
import { creatures, getCreatureByName } from '../src/creatures.js';
import { creatureCard, dex } from '../src/render.js';
test('ships the six launch companions', () => {
assert.equal(creatures.length, 6);
assert.ok(getCreatureByName('Zapbit'));
assert.ok(getCreatureByName('diskettex'));
});
test('renders creature cards', () => {
const card = creatureCard(getCreatureByName('NullWisp'));
assert.match(card, /NullWisp/);
assert.match(card, /Void/);
});
test('renders dex output', () => {
const output = dex();
assert.match(output, /PromptMoth/);
assert.match(output, /MergeDrake/);
});