We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
if the element only contains , when reading it with shallowWrapper.text(), it doesn't equal to ' ' (one space)
should equal to ' ' (one space)
// component const Foo = () => ( <div className={styles.foo}> </div> ); // test const container = shallow(<Foo />); expect(container.find(`.${styles.foo}`).text()).toEqual(' '); // test result expect(received).toEqual(expected) Expected value to equal: " " Received: " "
The text was updated successfully, but these errors were encountered:
related to #1349 ?
Sorry, something went wrong.
For now this works
expect(container.find(`.${styles.foo}`).text()).toEqual('\u00a0');
Basically nbsps translate to this unix code \u00a0
\u00a0
I think the issue is that perhaps your literal non-breaking space in your tests is getting transformed to a normal one.
I've added explicit tests for the character codes generated by non-breaking spaces, and they both are already passing.
956ef38
No branches or pull requests
Current behavior
if the element only contains
, when reading it with shallowWrapper.text(), it doesn't equal to ' ' (one space)Expected behavior
should equal to ' ' (one space)Your environment
API
Version
Adapter
code snippet
The text was updated successfully, but these errors were encountered: