jasmine-core 2.0.0 → 2.1.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- checksums.yaml +4 -4
- data/lib/console/console.js +54 -24
- data/lib/jasmine-core/__init__.py +1 -0
- data/lib/jasmine-core/boot/boot.js +2 -63
- data/lib/jasmine-core/boot/node_boot.js +19 -0
- data/lib/jasmine-core/boot.js +3 -64
- data/lib/jasmine-core/core.py +60 -0
- data/lib/jasmine-core/example/node_example/spec/PlayerSpec.js +60 -0
- data/lib/jasmine-core/example/node_example/spec/SpecHelper.js +15 -0
- data/lib/jasmine-core/example/node_example/src/Player.js +24 -0
- data/lib/jasmine-core/example/node_example/src/Song.js +9 -0
- data/lib/jasmine-core/jasmine-html.js +119 -74
- data/lib/jasmine-core/jasmine.css +61 -54
- data/lib/jasmine-core/jasmine.js +961 -456
- data/lib/jasmine-core/json2.js +73 -62
- data/lib/jasmine-core/node_boot.js +41 -0
- data/lib/jasmine-core/spec/console/ConsoleReporterSpec.js +52 -8
- data/lib/jasmine-core/spec/core/AnySpec.js +1 -0
- data/lib/jasmine-core/spec/core/ClockSpec.js +122 -18
- data/lib/jasmine-core/spec/core/DelayedFunctionSchedulerSpec.js +14 -1
- data/lib/jasmine-core/spec/core/EnvSpec.js +0 -63
- data/lib/jasmine-core/spec/core/ExceptionFormatterSpec.js +7 -0
- data/lib/jasmine-core/spec/core/ExceptionsSpec.js +2 -2
- data/lib/jasmine-core/spec/core/ExpectationSpec.js +46 -50
- data/lib/jasmine-core/spec/core/JsApiReporterSpec.js +37 -0
- data/lib/jasmine-core/spec/core/MockDateSpec.js +200 -0
- data/lib/jasmine-core/spec/core/ObjectContainingSpec.js +6 -0
- data/lib/jasmine-core/spec/core/PrettyPrintSpec.js +49 -12
- data/lib/jasmine-core/spec/core/QueueRunnerSpec.js +184 -60
- data/lib/jasmine-core/spec/core/SpecSpec.js +46 -108
- data/lib/jasmine-core/spec/core/SpyRegistrySpec.js +55 -0
- data/lib/jasmine-core/spec/core/SpySpec.js +10 -0
- data/lib/jasmine-core/spec/core/SpyStrategySpec.js +13 -0
- data/lib/jasmine-core/spec/core/SuiteSpec.js +143 -11
- data/lib/jasmine-core/spec/core/TimerSpec.js +18 -0
- data/lib/jasmine-core/spec/core/integration/CustomMatchersSpec.js +34 -32
- data/lib/jasmine-core/spec/core/integration/EnvSpec.js +969 -36
- data/lib/jasmine-core/spec/core/integration/SpecRunningSpec.js +279 -3
- data/lib/jasmine-core/spec/core/matchers/matchersUtilSpec.js +18 -1
- data/lib/jasmine-core/spec/core/matchers/toBeGreaterThanSpec.js +2 -1
- data/lib/jasmine-core/spec/core/matchers/toBeNaNSpec.js +3 -2
- data/lib/jasmine-core/spec/core/matchers/toBeUndefinedSpec.js +2 -1
- data/lib/jasmine-core/spec/core/matchers/toContainSpec.js +4 -2
- data/lib/jasmine-core/spec/core/matchers/toHaveBeenCalledSpec.js +2 -1
- data/lib/jasmine-core/spec/core/matchers/toHaveBeenCalledWithSpec.js +17 -3
- data/lib/jasmine-core/spec/core/matchers/toThrowErrorSpec.js +14 -14
- data/lib/jasmine-core/spec/core/matchers/toThrowSpec.js +5 -5
- data/lib/jasmine-core/spec/helpers/defineJasmineUnderTest.js +7 -0
- data/lib/jasmine-core/spec/helpers/nodeDefineJasmineUnderTest.js +33 -0
- data/lib/jasmine-core/spec/html/HtmlReporterSpec.js +183 -35
- data/lib/jasmine-core/spec/html/PrettyPrintHtmlSpec.js +1 -1
- data/lib/jasmine-core/spec/node_suite.js +9 -1
- data/lib/jasmine-core/spec/npmPackage/npmPackageSpec.js +104 -0
- data/lib/jasmine-core/spec/performance/large_object_test.js +36 -0
- data/lib/jasmine-core/version.rb +1 -1
- data/lib/jasmine-core.js +37 -0
- data/lib/jasmine-core.rb +6 -2
- metadata +23 -9
- data/lib/jasmine-core/spec/support/dev_boot.js +0 -124
@@ -38,13 +38,13 @@ describe("Custom Matchers (Integration)", function() {
|
|
38
38
|
});
|
39
39
|
|
40
40
|
it("passes the spec if the custom matcher passes", function(done) {
|
41
|
-
env.addMatchers({
|
42
|
-
toBeReal: function() {
|
43
|
-
return { compare: function() { return { pass: true }; } };
|
44
|
-
}
|
45
|
-
});
|
46
|
-
|
47
41
|
env.it("spec using custom matcher", function() {
|
42
|
+
env.addMatchers({
|
43
|
+
toBeReal: function() {
|
44
|
+
return { compare: function() { return { pass: true }; } };
|
45
|
+
}
|
46
|
+
});
|
47
|
+
|
48
48
|
env.expect(true).toBeReal();
|
49
49
|
});
|
50
50
|
|
@@ -57,16 +57,16 @@ describe("Custom Matchers (Integration)", function() {
|
|
57
57
|
});
|
58
58
|
|
59
59
|
it("uses the negative compare function for a negative comparison, if provided", function(done) {
|
60
|
-
env.addMatchers({
|
61
|
-
toBeReal: function() {
|
62
|
-
return {
|
63
|
-
compare: function() { return { pass: true }; },
|
64
|
-
negativeCompare: function() { return { pass: true }; }
|
65
|
-
};
|
66
|
-
}
|
67
|
-
});
|
68
|
-
|
69
60
|
env.it("spec with custom negative comparison matcher", function() {
|
61
|
+
env.addMatchers({
|
62
|
+
toBeReal: function() {
|
63
|
+
return {
|
64
|
+
compare: function() { return { pass: true }; },
|
65
|
+
negativeCompare: function() { return { pass: true }; }
|
66
|
+
};
|
67
|
+
}
|
68
|
+
});
|
69
|
+
|
70
70
|
env.expect(true).not.toBeReal();
|
71
71
|
});
|
72
72
|
|
@@ -79,17 +79,17 @@ describe("Custom Matchers (Integration)", function() {
|
|
79
79
|
});
|
80
80
|
|
81
81
|
it("generates messages with the same rules as built in matchers absent a custom message", function(done) {
|
82
|
-
env.
|
83
|
-
|
84
|
-
|
85
|
-
|
86
|
-
|
82
|
+
env.it('spec with an expectation', function() {
|
83
|
+
env.addMatchers({
|
84
|
+
toBeReal: function() {
|
85
|
+
return {
|
86
|
+
compare: function() {
|
87
|
+
return { pass: false };
|
88
|
+
}
|
87
89
|
}
|
88
90
|
}
|
89
|
-
}
|
90
|
-
});
|
91
|
+
});
|
91
92
|
|
92
|
-
env.it('spec with an expectation', function() {
|
93
93
|
env.expect("a").toBeReal();
|
94
94
|
});
|
95
95
|
|
@@ -103,13 +103,14 @@ describe("Custom Matchers (Integration)", function() {
|
|
103
103
|
|
104
104
|
it("passes the expected and actual arguments to the comparison function", function(done) {
|
105
105
|
var argumentSpy = jasmine.createSpy("argument spy").and.returnValue({ pass: true });
|
106
|
-
env.addMatchers({
|
107
|
-
toBeReal: function() {
|
108
|
-
return { compare: argumentSpy };
|
109
|
-
}
|
110
|
-
});
|
111
106
|
|
112
107
|
env.it('spec with an expectation', function () {
|
108
|
+
env.addMatchers({
|
109
|
+
toBeReal: function() {
|
110
|
+
return { compare: argumentSpy };
|
111
|
+
}
|
112
|
+
});
|
113
|
+
|
113
114
|
env.expect(true).toBeReal();
|
114
115
|
env.expect(true).toBeReal("arg");
|
115
116
|
env.expect(true).toBeReal("arg1", "arg2");
|
@@ -130,12 +131,13 @@ describe("Custom Matchers (Integration)", function() {
|
|
130
131
|
argumentSpy = jasmine.createSpy("argument spy").and.returnValue(matcherFactory),
|
131
132
|
customEqualityFn = function() { return true; };
|
132
133
|
|
133
|
-
env.addCustomEqualityTester(customEqualityFn);
|
134
|
-
env.addMatchers({
|
135
|
-
toBeReal: argumentSpy
|
136
|
-
});
|
137
134
|
|
138
135
|
env.it("spec with expectation", function() {
|
136
|
+
env.addCustomEqualityTester(customEqualityFn);
|
137
|
+
env.addMatchers({
|
138
|
+
toBeReal: argumentSpy
|
139
|
+
});
|
140
|
+
|
139
141
|
env.expect(true).toBeReal();
|
140
142
|
});
|
141
143
|
|