Skip to content

Commit 1047ce5

Browse files
committed
test: for string template
1 parent 2b3e49c commit 1047ce5

File tree

1 file changed

+9
-0
lines changed

1 file changed

+9
-0
lines changed

test/test-core.spec.ts

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,6 +3,7 @@ import path from 'path';
33
import test from 'ava';
44
import render from '../src';
55
import {closingSingleTagOptionEnum, closingSingleTagTypeEnum, quoteStyleEnum} from '../types/index.d';
6+
import parser from 'posthtml-parser';
67
import tree from './templates/parser';
78

89
const html = fs.readFileSync(path.resolve(__dirname, 'templates/render.html'), 'utf8');
@@ -187,6 +188,14 @@ test('{Tree} {Empty}', t => {
187188
t.is(render(), '');
188189
});
189190

191+
test.only('{Tree} {String Template}', t => {
192+
const html = `
193+
<div>String Template</div>
194+
`;
195+
const tree = parser(html);
196+
t.is(html, render(tree));
197+
});
198+
190199
test('{Tree} {HTML}', t => {
191200
t.is(html, render(tree));
192201
});

0 commit comments

Comments
 (0)