locale.spec.jsx 515 B

1234567891011121314151617181920
  1. import {render, screen} from 'sentry-test/reactTestingLibrary';
  2. import {tct} from 'sentry/locale';
  3. describe('locale.gettextComponentTemplate', () => {
  4. it('should render two component templates inside the same parent', () => {
  5. render(
  6. <div data-test-id="subject">
  7. {tct('1st: [one]', {
  8. one: 'one',
  9. })}
  10. {tct('2nd: [two]', {
  11. two: 'two',
  12. })}
  13. </div>
  14. );
  15. expect(screen.getByTestId('subject')).toHaveTextContent('1st: one2nd: two');
  16. });
  17. });