fix(cms): remove unpublished content fallbacks

This commit is contained in:
syntaxbullet
2026-07-31 14:25:11 +02:00
parent b18bbbe36a
commit 8dc17c0fea
17 changed files with 358 additions and 273 deletions

View File

@@ -0,0 +1,16 @@
import { describe, expect, it } from 'vitest'
import { pressEventsFromCms, pressNewsFromCms } from '@/spa/pressCollectionItems'
import { pressIndexContent } from '@/spa/pressIndexContent'
describe('press collection items', () => {
it('does not replace an empty published events collection with demo event rows', () => {
expect(
pressEventsFromCms([], '/images/event-placeholder.jpg', {}, pressIndexContent.events),
).toEqual([])
})
it('does not replace an empty published posts collection with demo news cards', () => {
expect(pressNewsFromCms([], '/images/news-placeholder.jpg', pressIndexContent.news)).toEqual([])
})
})