diff --git a/src/components/common/links/__snapshots__/translated-internal-link.test.tsx.snap b/src/components/common/links/__snapshots__/translated-internal-link.test.tsx.snap new file mode 100644 index 000000000..6e80bd859 --- /dev/null +++ b/src/components/common/links/__snapshots__/translated-internal-link.test.tsx.snap @@ -0,0 +1,12 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`TranslatedInternalLink renders with i18nKey 1`] = ` +
+ + testi18nKey + +
+`; diff --git a/src/components/common/links/translated-internal-link.test.tsx b/src/components/common/links/translated-internal-link.test.tsx new file mode 100644 index 000000000..fe6616747 --- /dev/null +++ b/src/components/common/links/translated-internal-link.test.tsx @@ -0,0 +1,20 @@ +/* + * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) + * + * SPDX-License-Identifier: AGPL-3.0-only + */ + +import { TranslatedInternalLink } from './translated-internal-link' +import { mockI18n } from '../../markdown-renderer/test-utils/mock-i18n' +import { render } from '@testing-library/react' + +describe('TranslatedInternalLink', () => { + const href = '/test' + beforeAll(async () => { + await mockI18n() + }) + it('renders with i18nKey', () => { + const view = render() + expect(view.container).toMatchSnapshot() + }) +})