import { expect, test } from 'bun:test';
import { readFileSync } from 'node:fs';
const docsIndexPath = new URL('./index.md', import.meta.url);
const docsIndexContents = readFileSync(docsIndexPath, 'utf8');
test('docs demo media uses shared cache-busting asset version token', () => {
expect(docsIndexContents).toMatch(/const demoAssetVersion = ['"][^'"]+['"]/);
expect(docsIndexContents).toContain(':poster="`/assets/minecard-poster.jpg?v=${demoAssetVersion}`"');
expect(docsIndexContents).toContain('');
expect(docsIndexContents).toContain('');
expect(docsIndexContents).toContain('');
expect(docsIndexContents).toContain('
');
});