Skip to content

Commit 48a72e7

Browse files
committed
Changes to avoid config deprecation warnings (from jasmine-core).
1 parent 6c7db63 commit 48a72e7

File tree

1 file changed

+9
-3
lines changed

1 file changed

+9
-3
lines changed

lib/jasmine.js

Lines changed: 9 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -115,16 +115,22 @@ Jasmine.prototype.loadConfigFile = function(configFilePath) {
115115
Jasmine.prototype.loadConfig = function(config) {
116116
this.specDir = config.spec_dir || this.specDir;
117117

118+
var configOptions = {};
119+
118120
if (config.stopSpecOnExpectationFailure !== undefined) {
119-
this.env.throwOnExpectationFailure(config.stopSpecOnExpectationFailure);
121+
configOptions.oneFailurePerSpec = config.stopSpecOnExpectationFailure;
120122
}
121123

122124
if (config.stopOnSpecFailure !== undefined) {
123-
this.env.stopOnSpecFailure(config.stopOnSpecFailure);
125+
configOptions.failFast = config.stopOnSpecFailure;
124126
}
125127

126128
if (config.random !== undefined) {
127-
this.env.randomizeTests(config.random);
129+
configOptions.random = config.random;
130+
}
131+
132+
if (Object.keys(configOptions).length > 0) {
133+
this.env.configure(configOptions);
128134
}
129135

130136
if(config.helpers) {

0 commit comments

Comments
 (0)