When running my unit test to check if my custom element is displaying the expected text inside paper-item, the test fails because textContent of element is prefixed and postfixed with \n
Expected outcome
textContent should not be prefixed and postfixed with \n.
Actual outcome
textContent is prefixed and postfixed with \n. Unit Test error messageexpected '\n \n \n\n My Text\n ' to equal 'My Text'
Description
When running my unit test to check if my custom element is displaying the expected text inside paper-item, the test fails because textContent of element is prefixed and postfixed with
\n
Expected outcome
textContent should not be prefixed and postfixed with
\n
.Actual outcome
textContent is prefixed and postfixed with
\n
. Unit Test error messageexpected '\n \n \n\n My Text\n ' to equal 'My Text'
Live Demo
https://elements.polymer-project.org/elements/paper-item?view=demo:demo/index.html&active=paper-item
Steps to reproduce
1) Open developer console. 2) Run
$('paper-item').textContent
3) textContent returnsItem
that is prefixed/postfixed with\n
Browsers Affected