Skip to content

Commit

Permalink
[tests] localhost.com -> localhost (#23816)
Browse files Browse the repository at this point in the history
  • Loading branch information
jbudz authored Oct 30, 2018
1 parent b80ab1c commit 07c9f1f
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 5 deletions.
8 changes: 4 additions & 4 deletions src/ui/public/kfetch/kfetch.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

jest.mock('../chrome', () => ({
addBasePath: (path: string) => `http://localhost.com/myBase/${path}`,
addBasePath: (path: string) => `http://localhost/myBase/${path}`,
}));

jest.mock('../metadata', () => ({
Expand Down Expand Up @@ -60,7 +60,7 @@ describe('kfetch', () => {
it('should use supplied pathname and querystring', async () => {
fetchMock.get('*', {});
await kfetch({ pathname: 'my/path', query: { a: 'b' } });
expect(fetchMock.lastUrl('*')).toBe('http://localhost.com/myBase/my/path?a=b');
expect(fetchMock.lastUrl('*')).toBe('http://localhost/myBase/my/path?a=b');
});

it('should use supplied headers', async () => {
Expand All @@ -87,7 +87,7 @@ describe('kfetch', () => {
it('should prepend url with basepath by default', async () => {
fetchMock.get('*', {});
await kfetch({ pathname: 'my/path' });
expect(fetchMock.lastUrl('*')).toBe('http://localhost.com/myBase/my/path');
expect(fetchMock.lastUrl('*')).toBe('http://localhost/myBase/my/path');
});

it('should not prepend url with basepath when disabled', async () => {
Expand Down Expand Up @@ -142,7 +142,7 @@ describe('kfetch', () => {

it('should contain response properties', () => {
expect(error.res.status).toBe(404);
expect(error.res.url).toBe('http://localhost.com/myBase/my/path');
expect(error.res.url).toBe('http://localhost/myBase/my/path');
});
});

Expand Down
2 changes: 1 addition & 1 deletion src/ui/public/kfetch/kfetch_abortable.test.ts
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,7 @@
*/

jest.mock('../chrome', () => ({
addBasePath: (path: string) => `http://localhost.com/myBase/${path}`,
addBasePath: (path: string) => `http://localhost/myBase/${path}`,
}));

jest.mock('../metadata', () => ({
Expand Down

0 comments on commit 07c9f1f

Please sign in to comment.