Skip to content

Commit

Permalink
Serializer: Remove More-specific tests
Browse files Browse the repository at this point in the history
  • Loading branch information
mcsf committed Feb 23, 2018
1 parent f30caee commit 5876177
Showing 1 changed file with 0 additions and 38 deletions.
38 changes: 0 additions & 38 deletions blocks/api/test/serializer.js
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,6 @@ import {
} from '../registration';
import { createBlock } from '../';
import InnerBlocks from '../../inner-blocks';
import { settings as moreSettings } from '../../library/more';

describe( 'block serializer', () => {
beforeAll( () => {
Expand Down Expand Up @@ -284,43 +283,6 @@ describe( 'block serializer', () => {
} );

describe( 'serializeBlock()', () => {
describe( '"more" block', () => {
beforeEach( () => {
registerBlockType( 'core/more', moreSettings );
} );

// FIXME: These tests aren't relevant anymore, but I kept them in
// the diff to better illustrate the changes.

it( 'serializes without text', () => {
const block = createBlock( 'core/more', {} );

const content = serializeBlock( block );

expect( content ).toBe( '<!-- wp:more -->\n<!--more-->\n<!-- /wp:more -->' );
} );

it( 'serializes with text', () => {
const block = createBlock( 'core/more', {
customText: 'Read more!',
} );

const content = serializeBlock( block );

expect( content ).toBe( '<!-- wp:more {"customText":"Read more!"} -->\n<!--more Read more!-->\n<!-- /wp:more -->' );
} );

it( 'serializes with no teaser', () => {
const block = createBlock( 'core/more', {
noTeaser: true,
} );

const content = serializeBlock( block );

expect( content ).toBe( '<!-- wp:more {"noTeaser":true} -->\n<!--more-->\n<!--noteaser-->\n<!-- /wp:more -->' );
} );
} );

it( 'serializes the fallback block without comment delimiters', () => {
registerBlockType( 'core/unknown-block', {
category: 'common',
Expand Down

0 comments on commit 5876177

Please sign in to comment.