1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32
|
<?php
use function Termwind\parse;
it('renders the element', function () {
$html = parse('<span>text</span>');
expect($html)->toBe('text');
});
it('empty space shouldn\'t be rendered', function () {
$html = parse(<<<'HTML'
<div>
<span class="px-1">hello</span>
<span class="px-1">world</span>
</div>
HTML
);
expect($html)->toBe(' hello world ');
});
it('sinlge space shouldn\'t be rendered', function () {
$html = parse(<<<'HTML'
<div>
<span class="px-1">hello</span> <span class="px-1">world</span>
</div>
HTML
);
expect($html)->toBe(' hello world ');
});
|