Skip to content

Commit

Permalink
✅ Fix textarea unit test
Browse files Browse the repository at this point in the history
  • Loading branch information
skerit committed Feb 7, 2024
1 parent 00ed0e8 commit 12d23e5
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions test/04-html_element.js
Original file line number Diff line number Diff line change
Expand Up @@ -118,11 +118,12 @@ describe('HTMLElement', function() {
area.value = 'test';
assert.strictEqual(area.value, 'test');

// Setting a textarea's value breaks the link with the innerText
assertEqualHtml(area.innerHTML, 'html');
// Even though setting a textarea's value does not change the "innerHTML"
// value on the browser, it does on the server
assertEqualHtml(area.innerHTML, 'test');

assertEqualHtml(input.outerHTML, '<input value="test">');
assertEqualHtml(area.outerHTML, '<textarea>html</textarea>');
assertEqualHtml(area.outerHTML, '<textarea>test</textarea>');
assertEqualHtml(div.outerHTML, '<div></div>');
});
});
Expand Down

0 comments on commit 12d23e5

Please sign in to comment.