diff --git a/test/result.spec.ts b/test/result.spec.ts index 4e4fa6f..46d22f2 100644 --- a/test/result.spec.ts +++ b/test/result.spec.ts @@ -24,11 +24,21 @@ describe('result', () => { const successData: Data = makeData(10) it('should execute the first function if value is an Err', () => { - expect(result(errData).fold(e => e.code, s => s.label.length)).toEqual(500) + expect( + result(errData).fold( + e => e.code, + s => s.label.length, + ), + ).toEqual(500) }) it('should execute the second function if value is an Ok', () => { - expect(result(successData).fold(e => e.code, s => s.label.length)).toEqual(5) + expect( + result(successData).fold( + e => e.code, + s => s.label.length, + ), + ).toEqual(5) }) }) }) diff --git a/test/when.spec.ts b/test/when.spec.ts index dfd5db8..015d3d1 100644 --- a/test/when.spec.ts +++ b/test/when.spec.ts @@ -57,7 +57,10 @@ describe('when', () => { when(item) .map(i => i.label.toUpperCase()) .filter(w => w.length > 10) - .fold(() => 'none', w => w), + .fold( + () => 'none', + w => w, + ), ).toEqual('none') }) @@ -79,7 +82,10 @@ describe('when', () => { when(item) .map(i => i.label.toUpperCase()) .filter(w => w.length > 1) - .fold(() => 'none', w => w), + .fold( + () => 'none', + w => w, + ), ).toEqual('OK') }) }) @@ -168,14 +174,20 @@ describe('when', () => { when((undefined as unknown) as Item) .map(i => i.label.toUpperCase()) .filter(w => w.length > 10) - .fold(() => 'none', w => w), + .fold( + () => 'none', + w => w, + ), ).toEqual('none') expect( when(item) .map(i => i.label.toUpperCase()) .filter(w => w.length > 10) - .fold(() => 'none', w => w), + .fold( + () => 'none', + w => w, + ), ).toEqual('none') }) @@ -189,7 +201,10 @@ describe('when', () => { when(item) .map(i => i.label.toUpperCase()) .filter(w => w.length > 1) - .fold(() => 'none', w => w), + .fold( + () => 'none', + w => w, + ), ).toEqual('OK') }) }) @@ -212,13 +227,19 @@ describe('whenAll', () => { expect( whenAll(['one', 2, undefined, 'bar']) .map(([word]) => word.toUpperCase()) - .fold(() => 'none', w => w), + .fold( + () => 'none', + w => w, + ), ).toEqual('none') expect( whenAll(['one', 2, 3, 'bar']) .map(([word]) => word.toUpperCase()) - .fold(() => 'none', w => w), + .fold( + () => 'none', + w => w, + ), ).toEqual('ONE') }) })