Skip to content

Commit

Permalink
Added test for Core/Paragraph block
Browse files Browse the repository at this point in the history
  • Loading branch information
jan-clockworkwp committed Dec 30, 2024
1 parent efc2006 commit 528f11e
Showing 1 changed file with 16 additions and 0 deletions.
16 changes: 16 additions & 0 deletions packages/blocks/tests/blocks/CoreParagraph.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -42,4 +42,20 @@ describe('<CoreParagraph />', () => {
</p>
`);
});

test('applies the HTML anchor attribute properly', () => {
renderProvider({
attributes: {
anchor: 'test-anchor',
content: 'Hello World',
},
});
expect(screen.queryByText('Hello World')).toMatchInlineSnapshot(`
<p
id="test-anchor"
>
Hello World
</p>
`);
});
});

0 comments on commit 528f11e

Please sign in to comment.