Skip to content

Commit

Permalink
chore: converted test to TS
Browse files Browse the repository at this point in the history
  • Loading branch information
up1512001 committed Jun 14, 2024
1 parent 57b8b61 commit d5ac08d
Showing 1 changed file with 6 additions and 6 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -311,7 +311,7 @@ test( 'that_autop_treats_block_level_elements_as_blocks', () => {
];

// Check whitespace normalization.
let content = [];
let content: string[] = [];

blocks.forEach( ( block ) => {
content.push( `<${ block }>foo</${ block }>` );
Expand Down Expand Up @@ -388,18 +388,18 @@ test( 'that autop treats inline elements as inline', () => {
'select',
];

let content = [];
let expected = [];
const content: string[] = [];
const expected: string[] = [];

inlines.forEach( ( inline ) => {
content.push( `<${ inline }>foo</${ inline }>` );
expected.push( `<p><${ inline }>foo</${ inline }></p>` );
} );

content = content.join( '\n\n' );
expected = expected.join( '\n' );
const contentString = content.join( '\n\n' );
const expectedString = expected.join( '\n' );

expect( autop( content ).trim() ).toBe( expected );
expect( autop( contentString ).trim() ).toBe( expectedString );
} );

test( 'element sanity', () => {
Expand Down

0 comments on commit d5ac08d

Please sign in to comment.