import { removeBoundsFromSavedObject } from './remove_bounds' ; describe ( 'removeBoundsFromSavedObject' , ( ) => { test ( 'Remove when present' , ( ) => { const attributes = { title : 'my map' , bounds : { type : 'polygon' , coordinates : [ [ [ 0 , 0 ] , [ 1 , 0 ] , [ 0 , 1 ] , [ 0 , 0 ] , ] , ] , } , } ; expect ( removeBoundsFromSavedObject ( { attributes } ) ) . toEqual ( { title : 'my map' , } ) ; } ) ; test ( 'No-op when absent' , ( ) => { const attributes = { title : 'my map' , } ; expect ( removeBoundsFromSavedObject ( { attributes } ) ) . toEqual ( { title : 'my map' , } ) ; } ) ; } ) ;