import parseHashQuery from "./parseHashQuery" ; it ( "should parse hash" , ( ) => { const testCases = [ [ "#commentID=comment-id" , { commentID : "comment-id" , } , ] , [ "#commentID=comment-id&storyURL=story-url" , { commentID : "comment-id" , storyURL : "story-url" , } , ] , [ "#" , { } ] , [ "" , { } ] , ] ; testCases . forEach ( ( [ url , expected ] ) => { expect ( parseHashQuery ( url ) ) . toEqual ( expected ) ; } ) ; } ) ;