Skip to content

Commit 95bad06

Browse files
committed
test: if in content has empty array, issue #56
1 parent 892d602 commit 95bad06

File tree

1 file changed

+14
-0
lines changed

1 file changed

+14
-0
lines changed

test/test-core.spec.ts

Lines changed: 14 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -167,6 +167,20 @@ test('{Content} {Array}', t => {
167167
t.is(render(fixture), expected);
168168
});
169169

170+
test('{Content} {Array<before empty array content>}', t => {
171+
const fixture = {
172+
content: [
173+
[],
174+
[
175+
{tag: 'style', content: 'body { color: red; }'}
176+
]
177+
]
178+
};
179+
const expected = '<div><style>body { color: red; }</style></div>';
180+
181+
t.is(render(fixture), expected);
182+
});
183+
170184
test('{Content} {Nested}', t => {
171185
const fixture = {
172186
content: [

0 commit comments

Comments
 (0)