mirror of
https://github.com/domfelipe/pokebuddy.git
synced 2026-08-07 08:16:48 +00:00
Initial commit: pokebuddy_cli
This commit is contained in:
commit
d58df9bd10
47 changed files with 1684 additions and 0 deletions
22
test/smoke.test.js
Normal file
22
test/smoke.test.js
Normal 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/);
|
||||
});
|
||||
Loading…
Add table
Add a link
Reference in a new issue