diff --git a/app/plugins/context/__tests__/request.test.js b/app/plugins/context/__tests__/request.test.js index e292fa3e5..69051bb9e 100644 --- a/app/plugins/context/__tests__/request.test.js +++ b/app/plugins/context/__tests__/request.test.js @@ -136,5 +136,6 @@ describe('request.*', () => { expect(result.request.getEnvironmentVariable('array_test')).toEqual(['a', 'b']); expect(result.request.getEnvironmentVariable('object_test')).toEqual({a: 'A', b: 'B'}); expect(result.request.getEnvironmentVariable('null_test')).toBe(null); + expect(result.request.getEnvironmentVariable('bad')).toBeUndefined(); }); }); diff --git a/app/plugins/context/request.js b/app/plugins/context/request.js index dedf4b9e7..fcf075b95 100644 --- a/app/plugins/context/request.js +++ b/app/plugins/context/request.js @@ -74,7 +74,7 @@ export function init ( getEnvironmentVariable (name: string): string | number | boolean | Object | Array | null { return renderedContext[name]; }, - getEnvironment (): string | number | boolean | Object | Array | null { + getEnvironment (): Object { return renderedContext; }