import * as O from '.' ; describe ( 'iso' , ( ) => { type Source = string ; const source = 'foo' ; const optic = O . iso ( ( x ) => x . split ( '' ) , ( x ) => x . join ( '' ) ) ; type Focus = string [ ] ; it ( 'get' , ( ) => { const result = O . get ( optic , source ) ; expect ( result ) . toEqual ( [ 'f' , 'o' , 'o' ] ) ; } ) ; it ( 'set - monomorphic' , ( ) => { const result = O . set ( optic , [ 'a' , 'b' ] , source ) ; expect ( result ) . toEqual ( 'ab' ) ; } ) ; it ( 'modify - monomorphic' , ( ) => { const result = O . modify ( optic , ( x ) => [ ... x ] . reverse ( ) , source ) ; expect ( result ) . toEqual ( 'oof' ) ; } ) ; } ) ;