Open benmonro opened 5 years ago
Need to check that. ttag has a default behaviour that strips spaces - https://ttag.js.org/docs/library-api.html#setdedent. Try to use that setting for the test environment, let me know if that works.
setDedent
setting was implementing for the multiline strings - https://ttag.js.org/docs/multiline-strings.html
Yeah I tried dedent but it didn't seem to affect it
We are refactoring our existing code to use ttag. We have some JSX that looks like this:
<span className={styles.calloutText}>Hello, </span>
then we change this to use ttag:
<span className={styles.calloutText}>{t`Hello, `}</span>
when we run our tests (which use jest snapshots), the test fails because of the non matching snapshot.
![image](https://user-images.githubusercontent.com/399236/62336587-c9c08c00-b485-11e9-9af3-f85cbccbf9d9.png)
note, some of our code have these types of characters interspersed inside the text, so we can't just remove it. like the word
you're
for example, which also fails for similar reasons.Was hoping you could provide some advice on how to solve this problem?