Skip to content

Commit 86a4a1a

Browse files
committed
Update unit tests to account for change to avoid config deprecation warnings.
1 parent 48a72e7 commit 86a4a1a

File tree

1 file changed

+8
-7
lines changed

1 file changed

+8
-7
lines changed

spec/jasmine_spec.js

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -13,7 +13,8 @@ describe('Jasmine', function() {
1313
execute: jasmine.createSpy('execute'),
1414
throwOnExpectationFailure: jasmine.createSpy('throwOnExpectationFailure'),
1515
stopOnSpecFailure: jasmine.createSpy('stopOnSpecFailure'),
16-
randomizeTests: jasmine.createSpy('randomizeTests')
16+
randomizeTests: jasmine.createSpy('randomizeTests'),
17+
configure: jasmine.createSpy('configure')
1718
}),
1819
Timer: jasmine.createSpy('Timer')
1920
};
@@ -191,39 +192,39 @@ describe('Jasmine', function() {
191192
this.configObject.stopSpecOnExpectationFailure = true;
192193
this.fixtureJasmine.loadConfig(this.configObject);
193194

194-
expect(this.fixtureJasmine.env.throwOnExpectationFailure).toHaveBeenCalledWith(true);
195+
expect(this.fixtureJasmine.env.configure).toHaveBeenCalledWith({oneFailurePerSpec: true});
195196
});
196197

197198
it('does not configure jasmine-core for stopping spec on expectation failure by default', function() {
198199
this.fixtureJasmine.loadConfig(this.configObject);
199200

200-
expect(this.fixtureJasmine.env.throwOnExpectationFailure).not.toHaveBeenCalled();
201+
expect(this.fixtureJasmine.env.configure).not.toHaveBeenCalled();
201202
});
202203

203204
it('can tell jasmine-core to stop execution when a spec fails', function() {
204205
this.configObject.stopOnSpecFailure = true;
205206
this.fixtureJasmine.loadConfig(this.configObject);
206207

207-
expect(this.fixtureJasmine.env.stopOnSpecFailure).toHaveBeenCalledWith(true);
208+
expect(this.fixtureJasmine.env.configure).toHaveBeenCalledWith({failFast: true});
208209
});
209210

210211
it('does not configure jasmine-core for stopping execution by default', function() {
211212
this.fixtureJasmine.loadConfig(this.configObject);
212213

213-
expect(this.fixtureJasmine.env.stopOnSpecFailure).not.toHaveBeenCalled();
214+
expect(this.fixtureJasmine.env.configure).not.toHaveBeenCalled();
214215
});
215216

216217
it('can tell jasmine-core to run random specs', function() {
217218
this.configObject.random = true;
218219
this.fixtureJasmine.loadConfig(this.configObject);
219220

220-
expect(this.fixtureJasmine.env.randomizeTests).toHaveBeenCalledWith(true);
221+
expect(this.fixtureJasmine.env.configure).toHaveBeenCalledWith({random: true});
221222
});
222223

223224
it('uses jasmine-core defaults if random is unspecified', function() {
224225
this.fixtureJasmine.loadConfig(this.configObject);
225226

226-
expect(this.fixtureJasmine.env.randomizeTests).not.toHaveBeenCalled();
227+
expect(this.fixtureJasmine.env.configure).not.toHaveBeenCalled();
227228
});
228229

229230
describe('with options', function() {

0 commit comments

Comments
 (0)