Skip to content

Commit 218b9bd

Browse files
committed
test: add test for style without children
1 parent 5ec3cca commit 218b9bd

2 files changed

Lines changed: 17 additions & 1 deletion

File tree

test/unit/__snapshots__/sanity-content.test.ts.snap

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -82,7 +82,8 @@ exports[`SanityContent > should render strong blocks 1`] = `"<p>An example of <s
8282
8383
exports[`SanityContent > should render textWithProps blocks 1`] = `
8484
"<div>hello worldI’m a heading!</div>
85-
<blockquote class=\\"blockquote\\">Build your next Vue.js application with confidence using <a href=\\"https://nuxtjs.org\\">NuxtJS</a>. An open source framework making web development simple and powerful.</blockquote>"
85+
<blockquote class=\\"blockquote\\">Build your next Vue.js application with confidence using <a href=\\"https://nuxtjs.org\\">NuxtJS</a>. An open source framework making web development simple and powerful.</blockquote>
86+
<h1>What we do</h1>"
8687
`;
8788
8889
exports[`SanityContent > should render with no props 1`] = `""`;

test/unit/fixture/portable-text/text-with-props.ts

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -48,4 +48,19 @@ export const textWithProps = [
4848
],
4949
style: 'blockquote',
5050
},
51+
{
52+
_key: 'e5833f6c5d88',
53+
_type: 'block',
54+
children: [
55+
{
56+
_key: '0ea0635ddc510',
57+
_type: 'span',
58+
marks: [],
59+
text: 'What we do',
60+
},
61+
],
62+
markDefs: [],
63+
style: 'h1',
64+
delay: 0.5,
65+
},
5166
]

0 commit comments

Comments
 (0)