diff --git a/tests/httpUtils.spec.ts b/tests/httpUtils.spec.ts index 61c17c80..e75576e0 100644 --- a/tests/httpUtils.spec.ts +++ b/tests/httpUtils.spec.ts @@ -1,33 +1,33 @@ -import { getURL } from "../src/utils/httpUtils"; +import { getURL } from '../src/utils/httpUtils'; describe('getURL', () => { - it('should return base + path if not fedramp', () => { - const base = 'api.dev.snyk.io'; - const path = '/analysis'; + it('should return base + path if not fedramp', () => { + const base = 'api.dev.snyk.io'; + const path = '/analysis'; - const result = getURL(base, path); + const result = getURL(base, path); - expect(result).toEqual(base+path); - }); + expect(result).toEqual(base + path); + }); - it('should return base + org routing + path if fedramp', () => { - const base = 'api.snykgov.io'; - const path = '/analysis'; - const orgId = '1-2-3-4' + it('should return base + org routing + path if fedramp', () => { + const base = 'api.snykgov.io'; + const path = '/analysis'; + const orgId = '1-2-3-4'; - const result = getURL(base, path, orgId); + const result = getURL(base, path, orgId); - expect(result).toEqual(base+'/hidden/orgs/'+orgId+'/code'+path); - }); + expect(result).toEqual(base + '/hidden/orgs/' + orgId + '/code' + path); + }); - it('should throw an error if fedramp and org is missing', () => { - const base = 'api.snykgov.io'; - const path = '/analysis'; + it('should throw an error if fedramp and org is missing', () => { + const base = 'api.snykgov.io'; + const path = '/analysis'; - try { - const result = getURL(base, path); - } catch (err) { - expect(err).toBeDefined(); - } - }); -}); \ No newline at end of file + try { + const result = getURL(base, path); + } catch (err) { + expect(err).toBeDefined(); + } + }); +});