Skip to content

Commit a0bf3ea

Browse files
committed
Added test
1 parent 9509b36 commit a0bf3ea

1 file changed

Lines changed: 9 additions & 0 deletions

File tree

packages/request/__tests__/client.test.js

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -112,6 +112,15 @@ describe('Client', () => {
112112
expect(client.baseUrl.href).toBe(url.href)
113113
})
114114

115+
it('should create an instance with url path preserved', () => {
116+
client = new Client({
117+
url: url.href,
118+
relativeUrl: 'foo/bar',
119+
})
120+
expect(url.href.endsWith('/')).toBe(false)
121+
expect(client.baseUrl.href).toBe(url.href + '/foo/bar')
122+
})
123+
115124
it('should create an instance with bearer authorization', () => {
116125
client = new Client({
117126
url,

0 commit comments

Comments
 (0)