From 9d1072d15cc796ecf53c9f9eec7460c8d6ab97fe Mon Sep 17 00:00:00 2001 From: damccorm Date: Wed, 10 Oct 2018 16:14:01 -0400 Subject: [PATCH] Found issue when no proxy wasn't set and set up tests better (#242) * Fixed a couple issues * Cleaning up, added wrong file last time --- api/WebApi.ts | 3 +++ make.js | 2 ++ test/units/tsconfig.json | 10 ++++++++++ 3 files changed, 15 insertions(+) create mode 100644 test/units/tsconfig.json diff --git a/api/WebApi.ts b/api/WebApi.ts index 1596062..ef9c51d 100644 --- a/api/WebApi.ts +++ b/api/WebApi.ts @@ -339,6 +339,9 @@ export class WebApi { * @param url: the server url */ public isNoProxyHost = function(_url: string) { + if (!process.env.no_proxy) { + return false; + } const noProxyDomains = (process.env.no_proxy || '') .split(',') .map(v => v.toLowerCase()); diff --git a/make.js b/make.js index 46ecc0d..ddfaf63 100644 --- a/make.js +++ b/make.js @@ -40,6 +40,8 @@ target.build = function() { target.units = function() { + target.build(); + pushd('test'); run('npm install ../_build'); popd(); diff --git a/test/units/tsconfig.json b/test/units/tsconfig.json new file mode 100644 index 0000000..d591a73 --- /dev/null +++ b/test/units/tsconfig.json @@ -0,0 +1,10 @@ +{ + "compilerOptions": { + "target": "ES6", + "module": "commonjs", + "moduleResolution": "node" + }, + "files": [ + "tests.ts" + ] +} \ No newline at end of file