{"size": 516, "ext": "js", "max_stars_repo_path": "src/utils/test/RouterUtils.test.js", "max_stars_repo_name": "ahabra/hash-router", "max_stars_repo_stars_event_min_datetime": "2021-02-09T22:55:05.000Z", "max_stars_repo_stars_event_max_datetime": "2021-02-09T22:55:05.000Z", "max_issues_repo_path": "src/utils/test/RouterUtils.test.js", "max_issues_repo_name": "ahabra/hash-router", "max_issues_repo_issues_event_min_datetime": null, "max_issues_repo_issues_event_max_datetime": null, "max_forks_repo_path": "src/utils/test/RouterUtils.test.js", "max_forks_repo_name": "ahabra/hash-router", "max_forks_repo_forks_event_min_datetime": null, "max_forks_repo_forks_event_max_datetime": null}
{"max_stars_count": 1, "max_issues_count": null, "max_forks_count": null, "avg_line_length": 28.6666666667, "max_line_length": 68, "alphanum_fraction": 0.5639534884}
import {expect} from '@esm-bundle/chai'
import * as RouterUtils from '../RouterUtils'

describe('RouterUtils', ()=> {

  describe('cleanPath', ()=> {
    const cleanPath = RouterUtils.cleanPath

    it('removes space, /, and #  from start and end of path', ()=> {
      expect(cleanPath('/a/')).to.equal('a')
      expect(cleanPath('#a#')).to.equal('a')
      expect(cleanPath('/#a#/')).to.equal('a')
      expect(cleanPath('#/a/#')).to.equal('a')
      expect(cleanPath(' # / a / # ')).to.equal('a')
    })
  })

})