Skip to content

Commit

Permalink
Fix unit tests
Browse files Browse the repository at this point in the history
  • Loading branch information
youknowriad committed Jun 20, 2018
1 parent 3d1fd0c commit 44ab993
Showing 1 changed file with 17 additions and 1 deletion.
18 changes: 17 additions & 1 deletion core-blocks/video/test/index.js
Original file line number Diff line number Diff line change
@@ -1,11 +1,27 @@
/**
* External dependencies
*/
import { get, mapValues } from 'lodash';

/**
* Internal dependencies
*/
import { name, settings } from '../';
import { name, definition, implementation } from '../';
import { blockEditRender } from '../../test/helpers';

describe( 'core/video', () => {
test( 'block edit matches snapshot', () => {
const settings = {
...definition,
...implementation,
attributes: mapValues( definition.attributes, ( attribute, key ) => {
const implementationAttribute = get( implementation.attributes, [ key ], {} );
return {
...attribute,
...implementationAttribute,
};
} ),
};
const wrapper = blockEditRender( name, settings );

expect( wrapper ).toMatchSnapshot();
Expand Down

0 comments on commit 44ab993

Please sign in to comment.