mirror of
https://git.shipoclu.com/moon/plspace.git
synced 2026-08-13 02:42:30 +00:00
add mfm support
This commit is contained in:
@@ -48,3 +48,21 @@ describe('BlogEntry YouTube embeds', () => {
|
||||
expect(view.getByTitle('YouTube video')).toBeInTheDocument()
|
||||
})
|
||||
})
|
||||
|
||||
describe('BlogEntry MFM rendering', () => {
|
||||
it('renders the Pleroma API MFM HTML inside a backend-free blog entry', () => {
|
||||
const view = renderEntry({
|
||||
content:
|
||||
'<p>It <span class="mfm-spin" data-mfm-speed="2s" data-mfm-left>works</span></p>',
|
||||
})
|
||||
|
||||
const effect = view.getByText('works')
|
||||
expect(effect).toHaveClass('mfm', '-pause')
|
||||
expect(effect).toHaveAttribute('data-mfm-operator', 'spin')
|
||||
expect(effect).toHaveStyle({
|
||||
animationName: 'mfm-spin',
|
||||
animationDuration: '2s',
|
||||
animationDirection: 'reverse',
|
||||
})
|
||||
})
|
||||
})
|
||||
|
||||
Reference in New Issue
Block a user