Skip to content

Commit

Permalink
Push failing parsing test
Browse files Browse the repository at this point in the history
  • Loading branch information
mcsf committed Aug 29, 2018
1 parent 96ecfb8 commit c154286
Showing 1 changed file with 27 additions and 0 deletions.
27 changes: 27 additions & 0 deletions packages/block-serialization-default-parser/test/index.js
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
/**
* Internal dependencies
*/
import { parse } from '../';

describe( 'block-serialization-spec-parser', () => {
test( 'parse() accepts inputs with multiple Reusable blocks', () => {
const result = parse(
'<!-- wp:block {"ref":313} /--><!-- wp:block {"ref":482} /-->'
);

expect( result ).toEqual( [
{
blockName: 'core/block',
attrs: { ref: 313 },
innerBlocks: [],
innerHTML: '',
},
{
blockName: 'core/block',
attrs: { ref: 482 },
innerBlocks: [],
innerHTML: '',
},
] );
} );
} );

0 comments on commit c154286

Please sign in to comment.