@@ -34,27 +34,27 @@ describe('Either', () => {
3434 expect ( eitherThing . isLeft ( ) ) . toBeFalsy ( )
3535 } )
3636
37- it ( 'should map to caseOf right side' , ( ) => {
37+ it ( 'should map to match right side' , ( ) => {
3838 const leftInput : number | undefined = undefined
3939 const rightInput = 'tester'
4040
4141 const eitherThing = either ( leftInput , rightInput )
4242
43- const mapped = eitherThing . caseOf ( {
43+ const mapped = eitherThing . match ( {
4444 left : num => '123' ,
4545 right : str => `${ str } _right`
4646 } )
4747
4848 expect ( mapped ) . toEqual ( 'tester_right' )
4949 } )
5050
51- it ( 'should map to caseOf left side' , ( ) => {
51+ it ( 'should map to match left side' , ( ) => {
5252 const leftInput = 123
5353 const rightInput : string | undefined = undefined
5454
5555 const eitherThing = either ( leftInput , rightInput )
5656
57- const mapped = eitherThing . caseOf ( {
57+ const mapped = eitherThing . match ( {
5858 left : num => `${ num } _left` ,
5959 right : str => `${ str } _right`
6060 } )
@@ -71,7 +71,7 @@ describe('Either', () => {
7171
7272 const mapped = eitherThing
7373 . map ( rightNum => rightNum + 12 )
74- . caseOf ( {
74+ . match ( {
7575 left : ( ) => 3 ,
7676 right : num => num
7777 } )
@@ -80,7 +80,7 @@ describe('Either', () => {
8080
8181 const mapped2 = eitherThing2
8282 . map ( rightNum => rightNum + 12 )
83- . caseOf ( {
83+ . match ( {
8484 left : ( ) => 3 ,
8585 right : num => num
8686 } )
@@ -96,7 +96,7 @@ describe('Either', () => {
9696
9797 const mapped = eitherThing
9898 . flatMap ( rightNum => either ( rightNum , input2 ) )
99- . caseOf ( {
99+ . match ( {
100100 left : ( ) => 3 ,
101101 right : num => num
102102 } )
@@ -112,7 +112,7 @@ describe('Either', () => {
112112
113113 const mapped = eitherThing
114114 . flatMap ( rightNum => either ( rightNum , input2 ) )
115- . caseOf ( {
115+ . match ( {
116116 left : ( ) => 3 ,
117117 right : num => num
118118 } )
0 commit comments