Skip to content

Commit d73ecff

Browse files
authored
Merge pull request #81 from posthtml/milestone-1.4.2
test: example for issue, close #79
2 parents 0f5f576 + 6e7587e commit d73ecff

File tree

3 files changed

+10
-1
lines changed

3 files changed

+10
-1
lines changed

test/expect/conditional_if.html

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@
22

33
<p>it works!</p>
44
<p>x</p>
5+
6+
<p>x</p>
7+
<p>x</p>

test/fixtures/conditional_if.html

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,9 @@
33
<p>it works!</p>
44
</if>
55
<p>x</p>
6+
7+
<p>x</p>
8+
<if condition="bool">
9+
<p>it works!</p>
10+
</if>
11+
<p>x</p>

test/test-conditionals.js

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -42,7 +42,7 @@ test('Conditionals', (t) => {
4242
})
4343

4444
test('Conditionals - only "if" condition', (t) => {
45-
return process(t, 'conditional_if', { locals: { foo: 'bar' } })
45+
return process(t, 'conditional_if', { locals: { foo: 'bar', bool: '' } })
4646
})
4747

4848
test('Conditionals - no render', (t) => {

0 commit comments

Comments
 (0)