diff --git a/src/components/common/icon-button/__snapshots__/translated-icon-button.test.tsx.snap b/src/components/common/icon-button/__snapshots__/translated-icon-button.test.tsx.snap new file mode 100644 index 000000000..0265d76a6 --- /dev/null +++ b/src/components/common/icon-button/__snapshots__/translated-icon-button.test.tsx.snap @@ -0,0 +1,24 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`TranslatedIconButton renders heart icon with i18nKey 1`] = ` +
+ +
+`; diff --git a/src/components/common/icon-button/translated-icon-button.test.tsx b/src/components/common/icon-button/translated-icon-button.test.tsx new file mode 100644 index 000000000..5ea28ad05 --- /dev/null +++ b/src/components/common/icon-button/translated-icon-button.test.tsx @@ -0,0 +1,17 @@ +/* + * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) + * + * SPDX-License-Identifier: AGPL-3.0-only + */ + +import { mockI18n } from '../../markdown-renderer/test-utils/mock-i18n' +import { render } from '@testing-library/react' +import { TranslatedIconButton } from './translated-icon-button' + +describe('TranslatedIconButton', () => { + it('renders heart icon with i18nKey', async () => { + await mockI18n() + const view = render() + expect(view.container).toMatchSnapshot() + }) +})