From 51e335067d3d79a7fcc627e6d162d104cf45df13 Mon Sep 17 00:00:00 2001 From: vinassefranche Date: Fri, 4 Mar 2022 17:18:48 +0100 Subject: [PATCH] Split the first test --- src/exo5/exo5.test.ts | 18 ++++++++++++++++++ src/exo5/exo5.ts | 34 +++++++++++++++++++++++++--------- 2 files changed, 43 insertions(+), 9 deletions(-) diff --git a/src/exo5/exo5.test.ts b/src/exo5/exo5.test.ts index a13e040..9a118d4 100644 --- a/src/exo5/exo5.test.ts +++ b/src/exo5/exo5.test.ts @@ -1,5 +1,6 @@ import { option } from 'fp-ts'; import { + getCountryCurrencyOfOptionalCountryCode, getValidCountryCodeOfCountryNames, giveCurrencyOfCountryToUser, performAsyncComputationInParallel, @@ -7,6 +8,23 @@ import { } from './exo5'; describe('exo5', () => { + describe('getCountryCurrencyOfOptionalCountryCode', () => { + it('should return a Task if given a None', async () => { + const result = await getCountryCurrencyOfOptionalCountryCode( + option.none, + )(); + + expect(result).toStrictEqual(option.none); + }); + + it('should return a Task