From 07c9f1f3be7679776f3944d714b9dbb07290e85b Mon Sep 17 00:00:00 2001 From: Jonathan Budzenski Date: Tue, 30 Oct 2018 11:46:50 -0500 Subject: [PATCH] [tests] localhost.com -> localhost (#23816) --- src/ui/public/kfetch/kfetch.test.ts | 8 ++++---- src/ui/public/kfetch/kfetch_abortable.test.ts | 2 +- 2 files changed, 5 insertions(+), 5 deletions(-) diff --git a/src/ui/public/kfetch/kfetch.test.ts b/src/ui/public/kfetch/kfetch.test.ts index c93630f3a898f..8d758c7a49a9c 100644 --- a/src/ui/public/kfetch/kfetch.test.ts +++ b/src/ui/public/kfetch/kfetch.test.ts @@ -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', () => ({ @@ -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 () => { @@ -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 () => { @@ -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'); }); }); diff --git a/src/ui/public/kfetch/kfetch_abortable.test.ts b/src/ui/public/kfetch/kfetch_abortable.test.ts index 38ce8faed43d5..bb1c5ac072524 100644 --- a/src/ui/public/kfetch/kfetch_abortable.test.ts +++ b/src/ui/public/kfetch/kfetch_abortable.test.ts @@ -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', () => ({