Disambiguate options params in Env
This commit is contained in:
@@ -1133,12 +1133,12 @@ getJasmineRequireObj().Env = function(j$) {
|
|||||||
* calling {@link jasmine.getEnv}.
|
* calling {@link jasmine.getEnv}.
|
||||||
* @hideconstructor
|
* @hideconstructor
|
||||||
*/
|
*/
|
||||||
function Env(options) {
|
function Env(envOptions) {
|
||||||
options = options || {};
|
envOptions = envOptions || {};
|
||||||
|
|
||||||
const self = this;
|
const self = this;
|
||||||
const GlobalErrors = options.GlobalErrors || j$.GlobalErrors;
|
const GlobalErrors = envOptions.GlobalErrors || j$.GlobalErrors;
|
||||||
const global = options.global || j$.getGlobal();
|
const global = envOptions.global || j$.getGlobal();
|
||||||
|
|
||||||
const realSetTimeout = global.setTimeout;
|
const realSetTimeout = global.setTimeout;
|
||||||
const realClearTimeout = global.clearTimeout;
|
const realClearTimeout = global.clearTimeout;
|
||||||
@@ -1316,7 +1316,7 @@ getJasmineRequireObj().Env = function(j$) {
|
|||||||
detectLateRejectionHandling: false
|
detectLateRejectionHandling: false
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!options.suppressLoadErrors) {
|
if (!envOptions.suppressLoadErrors) {
|
||||||
installGlobalErrors();
|
installGlobalErrors();
|
||||||
globalErrors.pushListener(function loadtimeErrorHandler(error, event) {
|
globalErrors.pushListener(function loadtimeErrorHandler(error, event) {
|
||||||
topSuite.result.failedExpectations.push({
|
topSuite.result.failedExpectations.push({
|
||||||
|
|||||||
@@ -7,12 +7,12 @@ getJasmineRequireObj().Env = function(j$) {
|
|||||||
* calling {@link jasmine.getEnv}.
|
* calling {@link jasmine.getEnv}.
|
||||||
* @hideconstructor
|
* @hideconstructor
|
||||||
*/
|
*/
|
||||||
function Env(options) {
|
function Env(envOptions) {
|
||||||
options = options || {};
|
envOptions = envOptions || {};
|
||||||
|
|
||||||
const self = this;
|
const self = this;
|
||||||
const GlobalErrors = options.GlobalErrors || j$.GlobalErrors;
|
const GlobalErrors = envOptions.GlobalErrors || j$.GlobalErrors;
|
||||||
const global = options.global || j$.getGlobal();
|
const global = envOptions.global || j$.getGlobal();
|
||||||
|
|
||||||
const realSetTimeout = global.setTimeout;
|
const realSetTimeout = global.setTimeout;
|
||||||
const realClearTimeout = global.clearTimeout;
|
const realClearTimeout = global.clearTimeout;
|
||||||
@@ -190,7 +190,7 @@ getJasmineRequireObj().Env = function(j$) {
|
|||||||
detectLateRejectionHandling: false
|
detectLateRejectionHandling: false
|
||||||
};
|
};
|
||||||
|
|
||||||
if (!options.suppressLoadErrors) {
|
if (!envOptions.suppressLoadErrors) {
|
||||||
installGlobalErrors();
|
installGlobalErrors();
|
||||||
globalErrors.pushListener(function loadtimeErrorHandler(error, event) {
|
globalErrors.pushListener(function loadtimeErrorHandler(error, event) {
|
||||||
topSuite.result.failedExpectations.push({
|
topSuite.result.failedExpectations.push({
|
||||||
|
|||||||
Reference in New Issue
Block a user