diff --git a/src/components/markdown-renderer/markdown-extension/__snapshots__/linkify-fix-markdown-extension.test.tsx.snap b/src/components/markdown-renderer/markdown-extension/__snapshots__/linkify-fix-markdown-extension.test.tsx.snap new file mode 100644 index 000000000..2ea8d1f1e --- /dev/null +++ b/src/components/markdown-renderer/markdown-extension/__snapshots__/linkify-fix-markdown-extension.test.tsx.snap @@ -0,0 +1,33 @@ +// Jest Snapshot v1, https://goo.gl/fbAQLP + +exports[`Linkify markdown extensions renders a .rocks link correctly 1`] = ` +
+`; diff --git a/src/components/markdown-renderer/markdown-extension/linkify-fix-markdown-extension.test.tsx b/src/components/markdown-renderer/markdown-extension/linkify-fix-markdown-extension.test.tsx new file mode 100644 index 000000000..72c45de35 --- /dev/null +++ b/src/components/markdown-renderer/markdown-extension/linkify-fix-markdown-extension.test.tsx @@ -0,0 +1,26 @@ +/* + * SPDX-FileCopyrightText: 2022 The HedgeDoc developers (see AUTHORS file) + * + * SPDX-License-Identifier: AGPL-3.0-only + */ + +import { mockI18n } from '../test-utils/mock-i18n' +import { render } from '@testing-library/react' +import { TestMarkdownRenderer } from '../test-utils/test-markdown-renderer' +import { LinkifyFixMarkdownExtension } from './linkify-fix-markdown-extension' + +describe('Linkify markdown extensions', () => { + beforeAll(async () => { + await mockI18n() + }) + + it('renders a .rocks link correctly', () => { + const view = render( +