diff --git a/jasmine/jasmine-tests.ts b/jasmine/jasmine-tests.ts
index d873d2716b..96ac307ca0 100644
--- a/jasmine/jasmine-tests.ts
+++ b/jasmine/jasmine-tests.ts
@@ -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();
diff --git a/jasmine/jasmine.d.ts b/jasmine/jasmine.d.ts
index 538aca3fb6..4eb2a054a1 100644
--- a/jasmine/jasmine.d.ts
+++ b/jasmine/jasmine.d.ts
@@ -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 , Theodore Brown , David Pärsson
// 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 {