import { atom , focusAtom } from '../src' ; test ( 'isomorphisms work' , done => { const myAtom = atom ( 0 ) ; const there = ( a ) => a + 1 ; const back = ( a ) => a - 1 ; const myFocus = focusAtom ( myAtom , optic => optic . iso ( there , back ) ) ; myAtom . update ( 1 ) ; expect ( myAtom . getValue ( ) ) . toEqual ( 1 ) ; expect ( myFocus . getValue ( ) ) . toEqual ( 2 ) ; done ( ) ; } ) ;