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.
Files changed (55) hide show
  1. checksums.yaml +4 -4
  2. data/lib/console/console.js +1 -1
  3. data/lib/jasmine-core/boot/boot.js +4 -1
  4. data/lib/jasmine-core/boot.js +5 -2
  5. data/lib/jasmine-core/jasmine-html.js +95 -31
  6. data/lib/jasmine-core/jasmine.css +1 -0
  7. data/lib/jasmine-core/jasmine.js +3635 -1684
  8. data/lib/jasmine-core/node_boot.js +1 -1
  9. data/lib/jasmine-core/spec/core/CallTrackerSpec.js +10 -0
  10. data/lib/jasmine-core/spec/core/ClearStackSpec.js +137 -0
  11. data/lib/jasmine-core/spec/core/ClockSpec.js +94 -14
  12. data/lib/jasmine-core/spec/core/DelayedFunctionSchedulerSpec.js +26 -8
  13. data/lib/jasmine-core/spec/core/EnvSpec.js +142 -10
  14. data/lib/jasmine-core/spec/core/ExpectationSpec.js +52 -7
  15. data/lib/jasmine-core/spec/core/GlobalErrorsSpec.js +110 -0
  16. data/lib/jasmine-core/spec/core/PrettyPrintSpec.js +132 -4
  17. data/lib/jasmine-core/spec/core/QueueRunnerSpec.js +333 -23
  18. data/lib/jasmine-core/spec/core/ReportDispatcherSpec.js +16 -1
  19. data/lib/jasmine-core/spec/core/SpecSpec.js +30 -8
  20. data/lib/jasmine-core/spec/core/SpyRegistrySpec.js +225 -1
  21. data/lib/jasmine-core/spec/core/SpySpec.js +44 -2
  22. data/lib/jasmine-core/spec/core/SpyStrategySpec.js +28 -5
  23. data/lib/jasmine-core/spec/core/SuiteSpec.js +14 -19
  24. data/lib/jasmine-core/spec/core/UserContextSpec.js +54 -0
  25. data/lib/jasmine-core/spec/core/UtilSpec.js +71 -0
  26. data/lib/jasmine-core/spec/core/asymmetric_equality/AnySpec.js +32 -0
  27. data/lib/jasmine-core/spec/core/asymmetric_equality/AnythingSpec.js +32 -0
  28. data/lib/jasmine-core/spec/core/asymmetric_equality/ArrayContainingSpec.js +13 -0
  29. data/lib/jasmine-core/spec/core/asymmetric_equality/ArrayWithExactContentsSpec.js +47 -0
  30. data/lib/jasmine-core/spec/core/asymmetric_equality/ObjectContainingSpec.js +13 -0
  31. data/lib/jasmine-core/spec/core/integration/CustomMatchersSpec.js +48 -0
  32. data/lib/jasmine-core/spec/core/integration/EnvSpec.js +339 -38
  33. data/lib/jasmine-core/spec/core/integration/SpecRunningSpec.js +156 -3
  34. data/lib/jasmine-core/spec/core/matchers/DiffBuilderSpec.js +47 -0
  35. data/lib/jasmine-core/spec/core/matchers/NullDiffBuilderSpec.js +13 -0
  36. data/lib/jasmine-core/spec/core/matchers/ObjectPathSpec.js +43 -0
  37. data/lib/jasmine-core/spec/core/matchers/matchersUtilSpec.js +231 -8
  38. data/lib/jasmine-core/spec/core/matchers/nothingSpec.js +8 -0
  39. data/lib/jasmine-core/spec/core/matchers/toBeCloseToSpec.js +42 -0
  40. data/lib/jasmine-core/spec/core/matchers/toBeNegativeInfinitySpec.js +31 -0
  41. data/lib/jasmine-core/spec/core/matchers/toBePositiveInfinitySpec.js +31 -0
  42. data/lib/jasmine-core/spec/core/matchers/toEqualSpec.js +780 -4
  43. data/lib/jasmine-core/spec/core/matchers/toHaveBeenCalledBeforeSpec.js +99 -0
  44. data/lib/jasmine-core/spec/core/matchers/toThrowErrorSpec.js +37 -0
  45. data/lib/jasmine-core/spec/helpers/BrowserFlags.js +4 -0
  46. data/lib/jasmine-core/spec/helpers/asyncAwait.js +27 -0
  47. data/lib/jasmine-core/spec/helpers/checkForMap.js +37 -0
  48. data/lib/jasmine-core/spec/helpers/checkForSet.js +41 -0
  49. data/lib/jasmine-core/spec/helpers/checkForSymbol.js +28 -0
  50. data/lib/jasmine-core/spec/helpers/checkForTypedArrays.js +20 -0
  51. data/lib/jasmine-core/spec/html/HtmlReporterSpec.js +105 -23
  52. data/lib/jasmine-core/spec/html/SpyRegistryHtmlSpec.js +34 -0
  53. data/lib/jasmine-core/spec/npmPackage/npmPackageSpec.js +1 -1
  54. data/lib/jasmine-core/version.rb +1 -1
  55. 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
+ });