import { unique } from './unique' ; describe ( 'unique' , ( ) => { it ( 'should return an array with unique value' , ( ) => { const array = [ 'foo' , 'bar' , 'toto' , 'toto' , 'titi' , 'foo' ] ; const resultExpected = [ 'foo' , 'bar' , 'toto' , 'titi' ] ; const result = unique ( array ) ; expect ( result ) . toEqual ( resultExpected ) ; } ) ; } ) ;