beeeeg update
Some checks failed
Test and deploy staging / staging (push) Has been cancelled

This commit is contained in:
2026-09-23 04:15:10 +00:00
parent 487eff5bb2
commit d0c7b6548b
135 changed files with 9531 additions and 1777 deletions

View File

@@ -0,0 +1,17 @@
import { describe, expect, it } from 'vitest';
import { slugify, validSlug } from './slugify';
describe('content slugs', () => {
it('turns titles into readable URL segments', () => {
expect(slugify('Hello, World!')).toBe('hello-world');
expect(slugify(' A / B ')).toBe('a-b');
expect(slugify('!!!', 'list')).toBe('list');
});
it('accepts only canonical editable slugs', () => {
expect(validSlug('my-list-2026')).toBe(true);
for (const value of ['My-List', 'two words', '-leading', 'trailing-', 'double--dash', '']) {
expect(validSlug(value)).toBe(false);
}
});
});