Skip to content

Commit ce5e01b

Browse files
committed
test: added td with text
1 parent 61cf2be commit ce5e01b

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,17 +141,20 @@ 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><td>&nbsp;</td>\t</tr>\r
144+
<tr><td>hello</td><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><td>\u00a0</td></tr></tbody></table>'
149+
'<table><tbody><tr><td>hello</td><td>\n</td><td>\u00a0</td></tr></tbody></table>'
150150
);
151151
expect(reactElement).toMatchInlineSnapshot(`
152152
<table>
153153
<tbody>
154154
<tr>
155+
<td>
156+
hello
157+
</td>
155158
<td>
156159
157160

0 commit comments

Comments
 (0)