jasmine-core 2.5.0 → 2.99.0
Sign up to get free protection for your applications and to get access to all the features.
- checksums.yaml +4 -4
- data/lib/console/console.js +1 -1
- data/lib/jasmine-core/boot/boot.js +4 -1
- data/lib/jasmine-core/boot.js +5 -2
- data/lib/jasmine-core/jasmine-html.js +95 -31
- data/lib/jasmine-core/jasmine.css +1 -0
- data/lib/jasmine-core/jasmine.js +3635 -1684
- data/lib/jasmine-core/node_boot.js +1 -1
- data/lib/jasmine-core/spec/core/CallTrackerSpec.js +10 -0
- data/lib/jasmine-core/spec/core/ClearStackSpec.js +137 -0
- data/lib/jasmine-core/spec/core/ClockSpec.js +94 -14
- data/lib/jasmine-core/spec/core/DelayedFunctionSchedulerSpec.js +26 -8
- data/lib/jasmine-core/spec/core/EnvSpec.js +142 -10
- data/lib/jasmine-core/spec/core/ExpectationSpec.js +52 -7
- data/lib/jasmine-core/spec/core/GlobalErrorsSpec.js +110 -0
- data/lib/jasmine-core/spec/core/PrettyPrintSpec.js +132 -4
- data/lib/jasmine-core/spec/core/QueueRunnerSpec.js +333 -23
- data/lib/jasmine-core/spec/core/ReportDispatcherSpec.js +16 -1
- data/lib/jasmine-core/spec/core/SpecSpec.js +30 -8
- data/lib/jasmine-core/spec/core/SpyRegistrySpec.js +225 -1
- data/lib/jasmine-core/spec/core/SpySpec.js +44 -2
- data/lib/jasmine-core/spec/core/SpyStrategySpec.js +28 -5
- data/lib/jasmine-core/spec/core/SuiteSpec.js +14 -19
- data/lib/jasmine-core/spec/core/UserContextSpec.js +54 -0
- data/lib/jasmine-core/spec/core/UtilSpec.js +71 -0
- data/lib/jasmine-core/spec/core/asymmetric_equality/AnySpec.js +32 -0
- data/lib/jasmine-core/spec/core/asymmetric_equality/AnythingSpec.js +32 -0
- data/lib/jasmine-core/spec/core/asymmetric_equality/ArrayContainingSpec.js +13 -0
- data/lib/jasmine-core/spec/core/asymmetric_equality/ArrayWithExactContentsSpec.js +47 -0
- data/lib/jasmine-core/spec/core/asymmetric_equality/ObjectContainingSpec.js +13 -0
- data/lib/jasmine-core/spec/core/integration/CustomMatchersSpec.js +48 -0
- data/lib/jasmine-core/spec/core/integration/EnvSpec.js +339 -38
- data/lib/jasmine-core/spec/core/integration/SpecRunningSpec.js +156 -3
- data/lib/jasmine-core/spec/core/matchers/DiffBuilderSpec.js +47 -0
- data/lib/jasmine-core/spec/core/matchers/NullDiffBuilderSpec.js +13 -0
- data/lib/jasmine-core/spec/core/matchers/ObjectPathSpec.js +43 -0
- data/lib/jasmine-core/spec/core/matchers/matchersUtilSpec.js +231 -8
- data/lib/jasmine-core/spec/core/matchers/nothingSpec.js +8 -0
- data/lib/jasmine-core/spec/core/matchers/toBeCloseToSpec.js +42 -0
- data/lib/jasmine-core/spec/core/matchers/toBeNegativeInfinitySpec.js +31 -0
- data/lib/jasmine-core/spec/core/matchers/toBePositiveInfinitySpec.js +31 -0
- data/lib/jasmine-core/spec/core/matchers/toEqualSpec.js +780 -4
- data/lib/jasmine-core/spec/core/matchers/toHaveBeenCalledBeforeSpec.js +99 -0
- data/lib/jasmine-core/spec/core/matchers/toThrowErrorSpec.js +37 -0
- data/lib/jasmine-core/spec/helpers/BrowserFlags.js +4 -0
- data/lib/jasmine-core/spec/helpers/asyncAwait.js +27 -0
- data/lib/jasmine-core/spec/helpers/checkForMap.js +37 -0
- data/lib/jasmine-core/spec/helpers/checkForSet.js +41 -0
- data/lib/jasmine-core/spec/helpers/checkForSymbol.js +28 -0
- data/lib/jasmine-core/spec/helpers/checkForTypedArrays.js +20 -0
- data/lib/jasmine-core/spec/html/HtmlReporterSpec.js +105 -23
- data/lib/jasmine-core/spec/html/SpyRegistryHtmlSpec.js +34 -0
- data/lib/jasmine-core/spec/npmPackage/npmPackageSpec.js +1 -1
- data/lib/jasmine-core/version.rb +1 -1
- metadata +19 -4
@@ -0,0 +1,31 @@
|
|
1
|
+
describe("toBeNegativeInfinity", function() {
|
2
|
+
it("fails for anything that isn't -Infinity", function() {
|
3
|
+
var matcher = jasmineUnderTest.matchers.toBeNegativeInfinity(),
|
4
|
+
result;
|
5
|
+
|
6
|
+
result = matcher.compare(1);
|
7
|
+
expect(result.pass).toBe(false);
|
8
|
+
|
9
|
+
result = matcher.compare(Number.NaN);
|
10
|
+
expect(result.pass).toBe(false);
|
11
|
+
|
12
|
+
result = matcher.compare(null);
|
13
|
+
expect(result.pass).toBe(false);
|
14
|
+
});
|
15
|
+
|
16
|
+
it("has a custom message on failure", function() {
|
17
|
+
var matcher = jasmineUnderTest.matchers.toBeNegativeInfinity(),
|
18
|
+
result = matcher.compare(0);
|
19
|
+
|
20
|
+
expect(result.message()).toEqual("Expected 0 not to be -Infinity.")
|
21
|
+
});
|
22
|
+
|
23
|
+
it("succeeds for -Infinity", function() {
|
24
|
+
var matcher = jasmineUnderTest.matchers.toBeNegativeInfinity(),
|
25
|
+
result = matcher.compare(Number.NEGATIVE_INFINITY);
|
26
|
+
|
27
|
+
expect(result.pass).toBe(true);
|
28
|
+
expect(result.message).toEqual("Expected actual to be -Infinity.")
|
29
|
+
});
|
30
|
+
|
31
|
+
});
|
@@ -0,0 +1,31 @@
|
|
1
|
+
describe("toBePositiveInfinity", function() {
|
2
|
+
it("fails for anything that isn't Infinity", function() {
|
3
|
+
var matcher = jasmineUnderTest.matchers.toBePositiveInfinity(),
|
4
|
+
result;
|
5
|
+
|
6
|
+
result = matcher.compare(1);
|
7
|
+
expect(result.pass).toBe(false);
|
8
|
+
|
9
|
+
result = matcher.compare(Number.NaN);
|
10
|
+
expect(result.pass).toBe(false);
|
11
|
+
|
12
|
+
result = matcher.compare(null);
|
13
|
+
expect(result.pass).toBe(false);
|
14
|
+
});
|
15
|
+
|
16
|
+
it("has a custom message on failure", function() {
|
17
|
+
var matcher = jasmineUnderTest.matchers.toBePositiveInfinity(),
|
18
|
+
result = matcher.compare(0);
|
19
|
+
|
20
|
+
expect(result.message()).toEqual("Expected 0 not to be Infinity.")
|
21
|
+
});
|
22
|
+
|
23
|
+
it("succeeds for Infinity", function() {
|
24
|
+
var matcher = jasmineUnderTest.matchers.toBePositiveInfinity(),
|
25
|
+
result = matcher.compare(Number.POSITIVE_INFINITY);
|
26
|
+
|
27
|
+
expect(result.pass).toBe(true);
|
28
|
+
expect(result.message).toEqual("Expected actual to be Infinity.")
|
29
|
+
});
|
30
|
+
|
31
|
+
});
|