UNPKG

479 BJavaScriptView Raw
1const parseUrl = require('./parseUrl')
2
3describe('Transloadit/parseUrl', () => {
4 it('splits a url into origin and pathname', () => {
5 expect(parseUrl('http://api2.transloadit.com/ws2012')).toEqual({
6 origin: 'http://api2.transloadit.com',
7 pathname: '/ws2012'
8 })
9 })
10
11 it('defaults to pathname=/ if absent', () => {
12 expect(parseUrl('http://api2.transloadit.com')).toEqual({
13 origin: 'http://api2.transloadit.com',
14 pathname: '/'
15 })
16 })
17})