From 05718c096968d95ec7eb61eff278896af289f217 Mon Sep 17 00:00:00 2001 From: VWSCoronaDashboard18 <93984341+VWSCoronaDashboard18@users.noreply.github.com> Date: Thu, 15 Dec 2022 15:23:13 +0100 Subject: [PATCH] Fix typos --- .../components/page-links.tsx | 2 +- .../utils/__tests__/is-internal-url.spec.ts | 28 +++++++++---------- 2 files changed, 15 insertions(+), 15 deletions(-) diff --git a/packages/app/src/components/page-information-block/components/page-links.tsx b/packages/app/src/components/page-information-block/components/page-links.tsx index b39d8c4198..6466fefa8c 100644 --- a/packages/app/src/components/page-information-block/components/page-links.tsx +++ b/packages/app/src/components/page-information-block/components/page-links.tsx @@ -24,7 +24,7 @@ export function PageLinks({ links }: pageLinksProps) { const combinedAriaLabel = (title: string) => `${commonTexts.informatie_header.external_link}. ${title}`; return ( - + {commonTexts.informatie_header.handige_links} {links.map((link, index) => ( diff --git a/packages/app/src/utils/__tests__/is-internal-url.spec.ts b/packages/app/src/utils/__tests__/is-internal-url.spec.ts index 0ae8aea928..e506bc1e92 100644 --- a/packages/app/src/utils/__tests__/is-internal-url.spec.ts +++ b/packages/app/src/utils/__tests__/is-internal-url.spec.ts @@ -16,15 +16,15 @@ const externalLinks = [ 'news-paper.nl/new-coronadashboard-is-live', 'http://news-paper.nl/new-coronadashboard-is-live', 'https://news-paper.nl/new-coronadashboard-is-live', - 'www.rijksoverheid.nl/see-our-new-dahsboard/?tracking="coronadashboard.rijksoverheid.nl"', - 'www.rijksoverheid.nl/see-our-new-dahsboard/?tracking="http://coronadashboard.rijksoverheid.nl"', - 'www.rijksoverheid.nl/see-our-new-dahsboard/?tracking="https://coronadashboard.rijksoverheid.nl"', - 'http://www.rijksoverheid.nl/see-our-new-dahsboard/?tracking="coronadashboard.riiksoverheid.nl"', - 'http://www.rijksoverheid.nl/see-our-new-dahsboard/?tracking="http://coronadashboard.rijksoverheid.nl"', - 'http://www.rijksoverheid.nl/see-our-new-dahsboard/?tracking="https://coronadashboard.rijksoverheid.nl"', - 'https://www.rijksoverheid.nl/see-our-new-dahsboard/?tracking="coronadashboard.rijksoverheid.nl"', - 'https://www.riiksoverheid.nl/see-our-new-dahsboard/?tracking="http://coronadashboard.rijksoverheid.nl"', - 'https://www.rijksoverheid.nl/see-our-new-dahsboard/?tracking="https://coronadashboard.rijksoverheid.nl"', + 'www.rijksoverheid.nl/see-our-new-dashboard/?tracking="coronadashboard.rijksoverheid.nl"', + 'www.rijksoverheid.nl/see-our-new-dashboard/?tracking="http://coronadashboard.rijksoverheid.nl"', + 'www.rijksoverheid.nl/see-our-new-dashboard/?tracking="https://coronadashboard.rijksoverheid.nl"', + 'http://www.rijksoverheid.nl/see-our-new-dashboard/?tracking="coronadashboard.riiksoverheid.nl"', + 'http://www.rijksoverheid.nl/see-our-new-dashboard/?tracking="http://coronadashboard.rijksoverheid.nl"', + 'http://www.rijksoverheid.nl/see-our-new-dashboard/?tracking="https://coronadashboard.rijksoverheid.nl"', + 'https://www.rijksoverheid.nl/see-our-new-dashboard/?tracking="coronadashboard.rijksoverheid.nl"', + 'https://www.riiksoverheid.nl/see-our-new-dashboard/?tracking="http://coronadashboard.rijksoverheid.nl"', + 'https://www.rijksoverheid.nl/see-our-new-dashboard/?tracking="https://coronadashboard.rijksoverheid.nl"', ]; const internalLinksCommon = ['#anchor', '/']; @@ -36,9 +36,9 @@ const interalLinksProd = [ 'www.coronadashboard.nl', 'http://www.coronadashboard.nl', 'https://www.coronadashboard.nl', - 'coronadashboard.rijskoverheid.nl', - 'http://coronadashboard.rijskoverheid.nl', - 'https://coronadashboard.rijskoverheid.nl', + 'coronadashboard.rijksoverheid.nl', + 'http://coronadashboard.rijksoverheid.nl', + 'https://coronadashboard.rijksoverheid.nl', 'coronadashboard.government.nl', 'http://coronadashboard.government.nl', 'https://coronadashboard.government.nl', @@ -48,13 +48,13 @@ const IsInternalUrl = suite('isInternalUrl'); IsInternalUrl('returns false for external urls', () => { externalLinks.forEach((url) => { - assert.not.ok(isInternalUrl(url), `${url} is seen as an internal link but probbably is an external url`); + assert.not.ok(isInternalUrl(url), `${url} is seen as an internal link but probably is an external url`); }); }); IsInternalUrl('returns true for internal urls', () => { [...internalLinksCommon, ...interalLinksProd].forEach((url) => { - assert.ok(isInternalUrl(url), `${url} is seen as an external link but probbably is an internal url`); + assert.ok(isInternalUrl(url), `${url} is seen as an external link but probably is an internal url`); }); });