Skip to content

Commit

Permalink
add failing test
Browse files Browse the repository at this point in the history
  • Loading branch information
liamdebeasi committed Feb 13, 2025
1 parent 9e2ebac commit 38fc8f4
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions packages/core/src/__tests__/builder.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -701,6 +701,59 @@ describe('Builder', () => {
`);
});

test.only('map Column widths', () => {
const content = {
data: {
blocks: [
{
'@type': '@builder.io/sdk:Element' as const,
component: {
name: 'Columns',
options: {
columns: [{ blocks: [], width: 50 }],
},
},
},
],
},
};

const mitosisJson = builderContentToMitosisComponent(content);

const backToBuilder = componentToBuilder()({ component: mitosisJson });
expect(backToBuilder).toMatchInlineSnapshot(`
{
"data": {
"blocks": [
{
"@type": "@builder.io/sdk:Element",
"actions": {},
"bindings": {},
"children": [],
"code": {
"actions": {},
"bindings": {},
},
"component": {
"name": "Columns",
"options": {
"columns": [
{
"blocks": [],
"width": 50
},
],
},
},
},
],
"jsCode": "",
"tsCode": "",
},
}
`);
});

test('nodes as props', () => {
const content = {
data: {
Expand Down

0 comments on commit 38fc8f4

Please sign in to comment.