locale.spec.tsx 573 B

1234567891011121314151617181920212223
  1. import {render, screen} from 'sentry-test/reactTestingLibrary';
  2. import {textWithMarkupMatcher} from 'sentry-test/utils';
  3. import {tct} from 'sentry/locale';
  4. describe('locale.gettextComponentTemplate', () => {
  5. it('should render two component templates inside the same parent', () => {
  6. render(
  7. <div>
  8. {tct('1st: [one]', {
  9. one: 'one',
  10. })}
  11. {tct('2nd: [two]', {
  12. two: 'two',
  13. })}
  14. </div>
  15. );
  16. expect(
  17. screen.getByText(textWithMarkupMatcher('1st: one2nd: two'))
  18. ).toBeInTheDocument();
  19. });
  20. });