@lyra/block-content-tests
Version:
Tests for shared block content rendering logic
46 lines (45 loc) • 1.13 kB
JavaScript
module.exports = {
input: [
{
style: 'normal',
_type: 'block',
_key: 'bd73ec5f61a1',
markDefs: [],
children: [
{
_type: 'span',
text: 'Also, images are pretty common.',
marks: []
}
]
},
{
_type: 'image',
_key: '53811e851487',
asset: {
_type: 'reference',
_ref: 'image-c2f0fc30003e6d7c79dcb5338a9b3d297cab4a8a-2000x1333-jpg'
},
crop: {
top: 0.0960960960960961,
bottom: 0.09609609609609615,
left: 0.2340000000000001,
right: 0.2240000000000001
},
hotspot: {
/* eslint-disable id-length */
x: 0.505,
y: 0.49999999999999994,
/* eslint-enable id-length */
height: 0.8078078078078077,
width: 0.5419999999999998
}
}
],
output: [
'<div>',
'<p>Also, images are pretty common.</p>',
'<figure><img src="https://lyra.api/images/production/c2f0fc30003e6d7c79dcb5338a9b3d297cab4a8a-2000x1333.jpg?rect=468,128,1084,1077&w=320&h=240"/></figure>',
'</div>'
].join('')
}