File tree Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Expand file tree Collapse file tree 2 files changed +28
-0
lines changed Original file line number Diff line number Diff line change @@ -29,6 +29,18 @@ exports[`<Image /> when receives a Image block without actions renders a <figure
2929</figure >
3030`;
3131
32+ exports[`<Image /> when receives a Image block without name renders a <figure > block with <img > and <figcaption > 1`] = `
33+ <figure >
34+ <img
35+ alt = " Deep in the universe"
36+ src = " https://cdn.directions.pt/uploads/2020/08/681-2000x1300-2.jpg"
37+ />
38+ <figcaption >
39+ Deep in the universe
40+ </figcaption >
41+ </figure >
42+ `;
43+
3244exports[`<Image /> when receives a SimpleImage block renders a <figure > block with <img > and <figcaption > 1`] = `
3345<figure >
3446 <img
Original file line number Diff line number Diff line change @@ -37,6 +37,22 @@ describe('<Image />', () => {
3737 } ) ;
3838 } ) ;
3939
40+ describe ( 'when receives a Image block without name' , ( ) => {
41+ const data : ImageBlockData = {
42+ file : {
43+ url : 'https://cdn.directions.pt/uploads/2020/08/681-2000x1300-2.jpg' ,
44+ } ,
45+ caption : 'Deep in the universe' ,
46+ withBorder : false ,
47+ stretched : false ,
48+ withBackground : false ,
49+ } ;
50+
51+ it ( 'renders a <figure> block with <img> and <figcaption>' , ( ) => {
52+ expect ( create ( < Image data = { data } /> ) . toJSON ( ) ) . toMatchSnapshot ( ) ;
53+ } ) ;
54+ } ) ;
55+
4056 describe ( 'when receives a SimpleImage block' , ( ) => {
4157 const data : ImageBlockData = {
4258 url : 'https://cdn.directions.pt/uploads/2020/08/681-2000x1300-2.jpg' ,
You can’t perform that action at this time.
0 commit comments