You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
13 lines
533 B
13 lines
533 B
import { describe, it, expect } from '@jest/globals'
|
|
import RequestClient from './RequestClient.js'
|
|
|
|
describe('RequestClient', () => {
|
|
it('has a hostname without trailing slash', () => {
|
|
const mockCore = { getState: () => ({}) }
|
|
const a = new RequestClient(mockCore, { companionUrl: 'http://companion.uppy.io' })
|
|
const b = new RequestClient(mockCore, { companionUrl: 'http://companion.uppy.io/' })
|
|
|
|
expect(a.hostname).toBe('http://companion.uppy.io')
|
|
expect(b.hostname).toBe('http://companion.uppy.io')
|
|
})
|
|
})
|
|
|