stripEndingSlash.js 481 B

12345678910111213
  1. 'use strict'
  2. const expect = require('chai').expect
  3. const stripEndingSlash = require('@joystream/storage-utils/stripEndingSlash')
  4. describe('stripEndingSlash', function () {
  5. it('stripEndingSlash should keep URL without the slash', function () {
  6. expect(stripEndingSlash('http://keep.one')).to.equal('http://keep.one')
  7. })
  8. it('stripEndingSlash should remove ending slash', function () {
  9. expect(stripEndingSlash('http://strip.one/')).to.equal('http://strip.one')
  10. })
  11. })