import generateEmbedFrameMarkup from '../'; describe( '#generateEmbedFrameMarkup()', () => { test( 'should return an empty string if no arguments passed', () => { expect( generateEmbedFrameMarkup() ).toEqual( '' ); } ); test( 'should generate markup with the body contents', () => { expect( generateEmbedFrameMarkup( { body: 'Hello World' } ) ).toEqual( '
Hello World
' ); } ); test( 'should generate markup with styles', () => { const styles = { 'jetpack-carousel': { src: 'https://s1.wp.com/wp-content/mu-plugins/carousel/jetpack-carousel.css?m=1458924076h&ver=20120629', media: 'all', }, }; expect( generateEmbedFrameMarkup( { styles } ) ).toEqual( '
' ); } ); test( 'should generate markup with scripts', () => { const scripts = { 'jetpack-facebook-embed': { src: 'https://s2.wp.com/wp-content/mu-plugins/shortcodes/js/facebook.js?ver', extra: 'var jpfbembed = {"appid":"249643311490"};', }, }; expect( generateEmbedFrameMarkup( { scripts } ) ).toEqual( '
' ); } ); } );