Skip to content

Commit 258f7ed

Browse files
committed
this test will only work if this gets merged: HenrikJoreteg/html-parse-stringify#64
1 parent f1bd087 commit 258f7ed

File tree

1 file changed

+27
-0
lines changed

1 file changed

+27
-0
lines changed

test/trans.render.object.spec.jsx

Lines changed: 27 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,33 @@ describe('trans using no children but components (object) - using index', () =>
6262
});
6363
});
6464

65+
describe.skip('trans using no children but components (object) - using names', () => {
66+
function TestComponent() {
67+
return (
68+
<Trans
69+
defaults="hello <italic>under ten</italic><10 this text after the sign should be rendered <bold>{{what}}</bold>"
70+
values={{ what: 'world' }}
71+
components={{ italic: <i>just dummy</i>, bold: <strong>univers</strong> }}
72+
/>
73+
);
74+
}
75+
it('should render translated string', () => {
76+
const { container } = render(<TestComponent />);
77+
expect(container.firstChild).toMatchInlineSnapshot(`
78+
<div>
79+
hello
80+
<i>
81+
under ten
82+
</i>
83+
&lt;10 this text after the sign should be rendered
84+
<strong>
85+
world
86+
</strong>
87+
</div>
88+
`);
89+
});
90+
});
91+
6592
describe('trans using no children but components (object) - using names', () => {
6693
function TestComponent() {
6794
return (

0 commit comments

Comments
 (0)