Skip to content

Commit

Permalink
chore: add tests
Browse files Browse the repository at this point in the history
  • Loading branch information
LuciNyan committed Oct 1, 2023
1 parent 3ea4712 commit b0d927d
Show file tree
Hide file tree
Showing 2 changed files with 12 additions and 1 deletion.
Loading
Sorry, something went wrong. Reload?
Sorry, we cannot display this file.
Sorry, this file is invalid so it cannot be displayed.
13 changes: 12 additions & 1 deletion test/white-space.test.tsx
Original file line number Diff line number Diff line change
Expand Up @@ -9,13 +9,24 @@ describe('white-space', () => {

describe('normal', () => {
it('should not render extra spaces with `white-space: normal`', async () => {
const EnSpace = String.fromCodePoint(Number('0x2002'))

const svg = await satori(
<div
style={{
width: '100%',
height: '100%',
whiteSpace: 'normal',
background: 'white',
display: 'flex',
flexDirection: 'column',
alignItems: 'center',
justifyContent: 'center',
}}
>
{' hello '}
<div>{'hello'}</div>
<div>{' hello '}</div>
<div>{'hello' + EnSpace}</div>
</div>,
{
width: 100,
Expand Down

0 comments on commit b0d927d

Please sign in to comment.