Removed deprecated env methods
This commit is contained in:
committed by
Steve Gravrock
parent
4b2a14f1f3
commit
1e8619df88
119
src/core/Env.js
119
src/core/Env.js
@@ -246,21 +246,6 @@ getJasmineRequireObj().Env = function(j$) {
|
||||
return result;
|
||||
};
|
||||
|
||||
Object.defineProperty(this, 'specFilter', {
|
||||
get: function() {
|
||||
self.deprecated(
|
||||
'Getting specFilter directly from Env is deprecated and will be removed in a future version of Jasmine, please check the specFilter option from `configuration`'
|
||||
);
|
||||
return config.specFilter;
|
||||
},
|
||||
set: function(val) {
|
||||
self.deprecated(
|
||||
'Setting specFilter directly on Env is deprecated and will be removed in a future version of Jasmine, please use the specFilter option in `configure`'
|
||||
);
|
||||
config.specFilter = val;
|
||||
}
|
||||
});
|
||||
|
||||
this.setDefaultSpyStrategy = function(defaultStrategyFn) {
|
||||
if (!currentRunnable()) {
|
||||
throw new Error(
|
||||
@@ -497,110 +482,6 @@ getJasmineRequireObj().Env = function(j$) {
|
||||
return buildExpectationResult(attrs);
|
||||
};
|
||||
|
||||
/**
|
||||
* Sets whether Jasmine should throw an Error when an expectation fails.
|
||||
* This causes a spec to only have one expectation failure.
|
||||
* @name Env#throwOnExpectationFailure
|
||||
* @since 2.3.0
|
||||
* @function
|
||||
* @param {Boolean} value Whether to throw when a expectation fails
|
||||
* @deprecated Use the `oneFailurePerSpec` option with {@link Env#configure}
|
||||
*/
|
||||
this.throwOnExpectationFailure = function(value) {
|
||||
this.deprecated(
|
||||
'Setting throwOnExpectationFailure directly on Env is deprecated and will be removed in a future version of Jasmine, please use the oneFailurePerSpec option in `configure`'
|
||||
);
|
||||
this.configure({ oneFailurePerSpec: !!value });
|
||||
};
|
||||
|
||||
this.throwingExpectationFailures = function() {
|
||||
this.deprecated(
|
||||
'Getting throwingExpectationFailures directly from Env is deprecated and will be removed in a future version of Jasmine, please check the oneFailurePerSpec option from `configuration`'
|
||||
);
|
||||
return config.oneFailurePerSpec;
|
||||
};
|
||||
|
||||
/**
|
||||
* Set whether to stop suite execution when a spec fails
|
||||
* @name Env#stopOnSpecFailure
|
||||
* @since 2.7.0
|
||||
* @function
|
||||
* @param {Boolean} value Whether to stop suite execution when a spec fails
|
||||
* @deprecated Use the `failFast` option with {@link Env#configure}
|
||||
*/
|
||||
this.stopOnSpecFailure = function(value) {
|
||||
this.deprecated(
|
||||
'Setting stopOnSpecFailure directly is deprecated and will be removed in a future version of Jasmine, please use the failFast option in `configure`'
|
||||
);
|
||||
this.configure({ failFast: !!value });
|
||||
};
|
||||
|
||||
this.stoppingOnSpecFailure = function() {
|
||||
this.deprecated(
|
||||
'Getting stoppingOnSpecFailure directly from Env is deprecated and will be removed in a future version of Jasmine, please check the failFast option from `configuration`'
|
||||
);
|
||||
return config.failFast;
|
||||
};
|
||||
|
||||
/**
|
||||
* Set whether to randomize test execution order
|
||||
* @name Env#randomizeTests
|
||||
* @since 2.4.0
|
||||
* @function
|
||||
* @param {Boolean} value Whether to randomize execution order
|
||||
* @deprecated Use the `random` option with {@link Env#configure}
|
||||
*/
|
||||
this.randomizeTests = function(value) {
|
||||
this.deprecated(
|
||||
'Setting randomizeTests directly is deprecated and will be removed in a future version of Jasmine, please use the random option in `configure`'
|
||||
);
|
||||
config.random = !!value;
|
||||
};
|
||||
|
||||
this.randomTests = function() {
|
||||
this.deprecated(
|
||||
'Getting randomTests directly from Env is deprecated and will be removed in a future version of Jasmine, please check the random option from `configuration`'
|
||||
);
|
||||
return config.random;
|
||||
};
|
||||
|
||||
/**
|
||||
* Set the random number seed for spec randomization
|
||||
* @name Env#seed
|
||||
* @since 2.4.0
|
||||
* @function
|
||||
* @param {Number} value The seed value
|
||||
* @deprecated Use the `seed` option with {@link Env#configure}
|
||||
*/
|
||||
this.seed = function(value) {
|
||||
this.deprecated(
|
||||
'Setting seed directly is deprecated and will be removed in a future version of Jasmine, please use the seed option in `configure`'
|
||||
);
|
||||
if (value) {
|
||||
config.seed = value;
|
||||
}
|
||||
return config.seed;
|
||||
};
|
||||
|
||||
this.hidingDisabled = function(value) {
|
||||
this.deprecated(
|
||||
'Getting hidingDisabled directly from Env is deprecated and will be removed in a future version of Jasmine, please check the hideDisabled option from `configuration`'
|
||||
);
|
||||
return config.hideDisabled;
|
||||
};
|
||||
|
||||
/**
|
||||
* @name Env#hideDisabled
|
||||
* @since 3.2.0
|
||||
* @function
|
||||
*/
|
||||
this.hideDisabled = function(value) {
|
||||
this.deprecated(
|
||||
'Setting hideDisabled directly is deprecated and will be removed in a future version of Jasmine, please use the hideDisabled option in `configure`'
|
||||
);
|
||||
config.hideDisabled = !!value;
|
||||
};
|
||||
|
||||
this.deprecated = function(deprecation) {
|
||||
var runnable = currentRunnable() || topSuite;
|
||||
var context;
|
||||
|
||||
Reference in New Issue
Block a user