mirror of
https://github.com/gosticks/DefinitelyTyped.git
synced 2026-10-03 14:27:04 +00:00
added seed, randomTests and randomizeTests property (#11678)
This commit is contained in:
committed by
Masahiro Wakame
parent
3a49556c30
commit
2a447aaeb0
@@ -904,6 +904,23 @@ describe("Custom matcher: 'toBeGoofy'", function () {
|
||||
});
|
||||
});
|
||||
|
||||
describe("Randomize Tests", function() {
|
||||
it("should allow randomization of the order of tests", function() {
|
||||
expect(function() {
|
||||
var env = jasmine.getEnv();
|
||||
return env.randomizeTests(true);
|
||||
}).not.toThrow();
|
||||
});
|
||||
|
||||
it("should allow a seed to be passed in for randomization", function() {
|
||||
expect(function() {
|
||||
var env = jasmine.getEnv();
|
||||
env.randomizeTests(true);
|
||||
return env.seed(1234);
|
||||
}).not.toThrow();
|
||||
});
|
||||
});
|
||||
|
||||
(() => {
|
||||
// from boot.js
|
||||
var env = jasmine.getEnv();
|
||||
|
||||
Vendored
+4
-1
@@ -1,4 +1,4 @@
|
||||
// Type definitions for Jasmine 2.2
|
||||
// Type definitions for Jasmine 2.4.1
|
||||
// Project: http://jasmine.github.io/
|
||||
// Definitions by: Boris Yankov <https://github.com/borisyankov/>, Theodore Brown <https://github.com/theodorejb>, David Pärsson <https://github.com/davidparsson/>
|
||||
// Definitions: https://github.com/DefinitelyTyped/DefinitelyTyped
|
||||
@@ -180,6 +180,9 @@ declare namespace jasmine {
|
||||
addMatchers(matchers: CustomMatcherFactories): void;
|
||||
specFilter(spec: Spec): boolean;
|
||||
throwOnExpectationFailure(value: boolean): void;
|
||||
seed: (s: number) => number;
|
||||
randomTests: () => boolean;
|
||||
randomizeTests: (b: boolean) => void;
|
||||
}
|
||||
|
||||
interface FakeTimer {
|
||||
|
||||
Reference in New Issue
Block a user