mirror of
https://github.com/runyanjake/cooking.git
synced 2026-11-13 00:24:51 -08:00
Tags render with their first letter uppercased on the recipe page, grid cards, sidebar facet, and active-filter chips, matching categories. The shared capitalize helper moves to lib/format.ts. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com> Co-authored-by: multica-agent <github@multica.ai>
11 lines
361 B
TypeScript
11 lines
361 B
TypeScript
import assert from 'node:assert/strict';
|
|
import { test } from 'node:test';
|
|
import { capitalize } from './format';
|
|
|
|
test('capitalize uppercases the first letter only', () => {
|
|
assert.equal(capitalize('italian'), 'Italian');
|
|
assert.equal(capitalize('ice cream'), 'Ice cream');
|
|
assert.equal(capitalize('BBQ'), 'BBQ');
|
|
assert.equal(capitalize(''), '');
|
|
});
|