diff --git a/test/i18n-test/languageHandler-test.js b/test/i18n-test/languageHandler-test.js
index f3c2e135d5..bdaa431e0a 100644
--- a/test/i18n-test/languageHandler-test.js
+++ b/test/i18n-test/languageHandler-test.js
@@ -49,15 +49,14 @@ describe('languageHandler', function() {
});
it('variable substitution with React component', function() {
- // Need an extra space at the end because the result of _t() has an extra empty node at the end
- const text = 'You are now ignoring %(userId)s ';
- expect(JSON.stringify(languageHandler._t(text, { userId: () => foo })))
- .toBe(JSON.stringify((You are now ignoring foo )));
+ const text = 'You are now ignoring %(userId)s';
+ expect(languageHandler._t(text, { userId: () => foo }))
+ .toEqual((You are now ignoring foo));
});
it('tag substitution with React component', function() {
const text = 'Press to start a chat with someone';
- expect(JSON.stringify(languageHandler._t(text, {}, { 'StartChatButton': () => foo })))
- .toBe(JSON.stringify(Press foo to start a chat with someone));
+ expect(languageHandler._t(text, {}, { 'StartChatButton': () => foo }))
+ .toEqual(Press foo to start a chat with someone);
});
});