Skip to content

Commit

Permalink
[ci] format
Browse files Browse the repository at this point in the history
  • Loading branch information
matthewp authored and astrobot-houston committed Oct 13, 2022
1 parent 90b715d commit f49d80d
Showing 1 changed file with 15 additions and 13 deletions.
28 changes: 15 additions & 13 deletions packages/astro/test/units/render/jsx.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -54,7 +54,7 @@ describe('core/render', () => {
const Wrapper = createComponent((result, _props, slots = {}) => {
return render`<div>${renderSlot(result, slots['my-slot'])}</div>`;
});

const Page = createAstroJSXComponent(() => {
return jsx('main', {
children: [
Expand All @@ -64,29 +64,31 @@ describe('core/render', () => {
jsx('p', {
slot: 'my-slot',
className: 'n',
children: 'works'
})
]
children: 'works',
}),
],
}),
jsx(Wrapper, {
// Children as a VNode
children: jsx('p', {
slot: 'my-slot',
className: 'p',
children: 'works'
})
})
]
})
children: 'works',
}),
}),
],
});
});

const ctx = createRenderContext({ request: new Request('http:https://example.com/' )});
const ctx = createRenderContext({ request: new Request('http:https://example.com/') });
const response = await renderPage(createAstroModule(Page), ctx, env);

expect(response.status).to.equal(200);

const html = await response.text();
expect(html).to.include('<main><div><p class="n">works</p></div><div><p class="p">works</p></div></main>');
expect(html).to.include(
'<main><div><p class="n">works</p></div><div><p class="p">works</p></div></main>'
);
});
});
});

0 comments on commit f49d80d

Please sign in to comment.