18 lines
960 B
TypeScript
18 lines
960 B
TypeScript
import React from 'react';
|
||
import { renderToStaticMarkup } from 'react-dom/server';
|
||
import { expect, it } from 'vitest';
|
||
import BlogPostClient from '../../../components/BlogPostClient';
|
||
|
||
it.each([null, undefined, 'invalid', '2026-10-29T07:11:40.925Z', '2026-10-28T00:00:00Z'])(
|
||
'actual client keeps publication but no visible update for %s despite later technical writes', (contentUpdatedAt) => {
|
||
const html = renderToStaticMarkup(<BlogPostClient
|
||
blog={{ id: 'timestamp-fixture', slug: 'timestamp-fixture', title: 'Timestamp',
|
||
publishedAt: '2026-10-29T07:11:40.925Z', contentUpdatedAt,
|
||
updatedAt: '2026-10-30T10:00:00Z', imageUrl: '/attached.webp' }}
|
||
publishedDate="۱۴۰۵/۸/۷" sanitizedContent="<p>Article</p>" authorName="کنینا"
|
||
/>);
|
||
expect(html).toContain('تاریخ انتشار');
|
||
expect(html).toContain('۱۴۰۵/۸/۷');
|
||
expect(html).not.toContain('آخرین بهروزرسانی');
|
||
});
|