RequestClient.test.js 454 B

123456789101112
  1. const RequestClient = require('./RequestClient')
  2. describe('RequestClient', () => {
  3. it('has a hostname without trailing slash', () => {
  4. const mockCore = { getState: () => ({}) }
  5. const a = new RequestClient(mockCore, { host: 'http://server.uppy.io' })
  6. const b = new RequestClient(mockCore, { host: 'http://server.uppy.io/' })
  7. expect(a.hostname).toBe('http://server.uppy.io')
  8. expect(b.hostname).toBe('http://server.uppy.io')
  9. })
  10. })