From 34a76659c15b896f96955338a39ff26b9c7f7751 Mon Sep 17 00:00:00 2001 From: Aleksa Kis <59057989+aleksaKis@users.noreply.github.com> Date: Tue, 4 Jan 2022 16:59:50 +0100 Subject: [PATCH] chore(client): ts-migrate Challenges/utils test (#44672) * chore(challenges-utils): Change test util file extension * chore(challenges-utils): typescript migration of Challenges util test --- .../Challenges/utils/{index.test.js => index.test.ts} | 3 +-- client/src/templates/Challenges/utils/index.ts | 2 +- 2 files changed, 2 insertions(+), 3 deletions(-) rename client/src/templates/Challenges/utils/{index.test.js => index.test.ts} (94%) diff --git a/client/src/templates/Challenges/utils/index.test.js b/client/src/templates/Challenges/utils/index.test.ts similarity index 94% rename from client/src/templates/Challenges/utils/index.test.js rename to client/src/templates/Challenges/utils/index.test.ts index 69e459583f..310cf284de 100644 --- a/client/src/templates/Challenges/utils/index.test.js +++ b/client/src/templates/Challenges/utils/index.test.ts @@ -1,9 +1,8 @@ +import { getGuideUrl } from './index'; import envData from '../../../../../config/env.json'; const { forumLocation } = envData; -const { getGuideUrl } = require('./'); - describe('index', () => { describe('getGuideUrl', () => { it('should use forum topic url when forumTopicId is supplied', () => { diff --git a/client/src/templates/Challenges/utils/index.ts b/client/src/templates/Challenges/utils/index.ts index 5142978887..2b916adf97 100644 --- a/client/src/templates/Challenges/utils/index.ts +++ b/client/src/templates/Challenges/utils/index.ts @@ -3,7 +3,7 @@ import envData from '../../../../../config/env.json'; const { forumLocation } = envData; interface GuideData { - forumTopicId: number; + forumTopicId?: number; title?: string; }