From 45445b60832c04f0551e5bcd05fbd33ab3cd9c65 Mon Sep 17 00:00:00 2001 From: Riad Benguella Date: Thu, 17 May 2018 09:34:00 +0100 Subject: [PATCH] Fix unit tests --- core-blocks/video/test/index.js | 18 +++++++++++++++++- 1 file changed, 17 insertions(+), 1 deletion(-) diff --git a/core-blocks/video/test/index.js b/core-blocks/video/test/index.js index a947f278a5882..1319a91177855 100644 --- a/core-blocks/video/test/index.js +++ b/core-blocks/video/test/index.js @@ -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();