Skip to content

Commit 425fc70

Browse files
committed
test: raw in condifiton, issue #82
1 parent b351d16 commit 425fc70

File tree

3 files changed

+16
-0
lines changed

3 files changed

+16
-0
lines changed

test/expect/raw_in_condition.html

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
2+
{{ foo }}
3+
4+
<p class="{{ dynamicClass }}">bar</p>
5+
Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,7 @@
1+
<if condition="foo === 'bar'">
2+
<raw>
3+
{{ foo }}
4+
</raw>
5+
</if>
6+
<p class="@{{ dynamicClass }}">{{ foo }}</p>
7+

test/test-core.js

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,10 @@ test('Raw output', (t) => {
7878
return process(t, 'raw', { locals: { foo: 'bar' } })
7979
})
8080

81+
test.only('Raw output - inside condition', (t) => {
82+
return process(t, 'raw_in_condition', { locals: { foo: 'bar' } })
83+
})
84+
8185
test('Raw output - custom tag', (t) => {
8286
return process(t, 'raw_custom', { ignoredTag: 'verbatim', locals: { foo: 'bar' } })
8387
})

0 commit comments

Comments
 (0)