Skip to content

Commit 61cf2be

Browse files
committed
test: added td with  
1 parent 271803e commit 61cf2be

File tree

1 file changed

+5
-2
lines changed

1 file changed

+5
-2
lines changed

test/index.test.js

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -141,12 +141,12 @@ describe('trim option', () => {
141141
it('preserves whitespace text nodes when disabled if valid in parent (default)', () => {
142142
const html = `<table>
143143
<tbody>
144-
<tr><td>\n</td>\t</tr>\r
144+
<tr><td>\n</td><td>&nbsp;</td>\t</tr>\r
145145
</tbody>
146146
</table>`;
147147
const reactElement = parse(html);
148148
expect(render(reactElement)).toBe(
149-
'<table><tbody><tr><td>\n</td></tr></tbody></table>'
149+
'<table><tbody><tr><td>\n</td><td>\u00a0</td></tr></tbody></table>'
150150
);
151151
expect(reactElement).toMatchInlineSnapshot(`
152152
<table>
@@ -156,6 +156,9 @@ describe('trim option', () => {
156156
157157
158158
</td>
159+
<td>
160+
\u00a0
161+
</td>
159162
</tr>
160163
</tbody>
161164
</table>

0 commit comments

Comments
 (0)