From 44ab9938a91329822c9431eb65489ed141e53252 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 a947f278a58826..1319a91177855e 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();