jasmine-core 2.0.4 → 2.1.3
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.
- package/.sass-cache/c9fbb86519a1b91fba93276cbdf39f49690cb852/_HTMLReporter.scssc +0 -0
- package/CONTRIBUTING.md +1 -1
- package/README.md +6 -5
- package/RELEASE.md +8 -1
- package/lib/console/console.js +26 -2
- package/lib/jasmine-core/boot.js +1 -1
- package/lib/jasmine-core/example/node_example/spec/PlayerSpec.js +2 -2
- package/lib/jasmine-core/jasmine-html.js +16 -2
- package/lib/jasmine-core/jasmine.css +1 -0
- package/lib/jasmine-core/jasmine.js +712 -397
- package/lib/jasmine-core/json2.js +73 -62
- package/lib/jasmine-core.js +29 -31
- package/package.json +1 -1
- package/pkg/jasmine-core-2.1.0.gem +0 -0
- package/pkg/jasmine-core-2.1.1.gem +0 -0
- package/pkg/jasmine-core-2.1.2.gem +0 -0
- package/pkg/jasmine-core-2.1.3.gem +0 -0
|
Binary file
|
package/CONTRIBUTING.md
CHANGED
|
@@ -100,7 +100,7 @@ Jasmine uses the [Jasmine Ruby gem](http://github.com/pivotal/jasmine-gem) to te
|
|
|
100
100
|
|
|
101
101
|
...and then visit `http://localhost:8888` to run specs.
|
|
102
102
|
|
|
103
|
-
Jasmine uses
|
|
103
|
+
Jasmine uses the [Jasmine NPM package](http://github.com/pivotal/jasmine-npm) to test itself in a Node.js/npm environment.
|
|
104
104
|
|
|
105
105
|
$ grunt execSpecsInNode
|
|
106
106
|
|
package/README.md
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
<a name="README">[<img src="https://rawgithub.com/pivotal/jasmine/master/images/jasmine-horizontal.svg" width="400px" />](http://jasmine.github.io)</a>
|
|
2
2
|
|
|
3
|
-
[](https://travis-ci.org/jasmine/jasmine) [](https://codeclimate.com/github/pivotal/jasmine)
|
|
4
4
|
|
|
5
5
|
=======
|
|
6
6
|
|
|
@@ -53,12 +53,13 @@ For the Jasmine Python Egg:<br>
|
|
|
53
53
|
|
|
54
54
|
## Maintainers
|
|
55
55
|
|
|
56
|
-
* [Davis W. Frank](mailto:dwfrank@
|
|
57
|
-
* [Rajan Agaskar](mailto:rajan@
|
|
58
|
-
* [
|
|
56
|
+
* [Davis W. Frank](mailto:dwfrank@pivotal.io), Pivotal Labs
|
|
57
|
+
* [Rajan Agaskar](mailto:rajan@pivotal.io), Pivotal Labs
|
|
58
|
+
* [Gregg Van Hove](mailto:ghove@pivotal.io), Pivotal Labs
|
|
59
59
|
|
|
60
60
|
### Maintainers Emeritus
|
|
61
61
|
|
|
62
|
-
* [Christian Williams](mailto:antixian666@gmail.com),
|
|
62
|
+
* [Christian Williams](mailto:antixian666@gmail.com), Cloud Foundry
|
|
63
|
+
* Sheel Choksi
|
|
63
64
|
|
|
64
65
|
Copyright (c) 2008-2014 Pivotal Labs. This software is licensed under the MIT License.
|
package/RELEASE.md
CHANGED
|
@@ -33,7 +33,7 @@ When ready to release - specs are all green and the stories are done:
|
|
|
33
33
|
|
|
34
34
|
1. Build the standalone distribution with `grunt buildStandaloneDist`
|
|
35
35
|
1. Make sure you add the new ZIP file to git
|
|
36
|
-
1. Should we still do this? Given we want to use
|
|
36
|
+
1. Should we still do this? Given we want to use github releases...
|
|
37
37
|
|
|
38
38
|
### Release the Python egg
|
|
39
39
|
|
|
@@ -52,6 +52,13 @@ When ready to release - specs are all green and the stories are done:
|
|
|
52
52
|
1. `npm adduser` to save your credentials locally
|
|
53
53
|
1. `npm publish .` to publish what's in `package.json`
|
|
54
54
|
|
|
55
|
+
### Release the docs
|
|
56
|
+
|
|
57
|
+
Probably only need to do this when releasing a minor version, and not a patch version.
|
|
58
|
+
|
|
59
|
+
1. `cp edge ${version}` to copy the current edge docs to the new version
|
|
60
|
+
1. Add a link to the new version in `index.html`
|
|
61
|
+
|
|
55
62
|
### Finally
|
|
56
63
|
|
|
57
64
|
1. Visit the [Releases page for Jasmine](https://github.com/pivotal/jasmine/releases), find the tag just pushed.
|
package/lib/console/console.js
CHANGED
|
@@ -54,7 +54,10 @@ getJasmineRequireObj().ConsoleReporter = function() {
|
|
|
54
54
|
red: '\x1B[31m',
|
|
55
55
|
yellow: '\x1B[33m',
|
|
56
56
|
none: '\x1B[0m'
|
|
57
|
-
}
|
|
57
|
+
},
|
|
58
|
+
failedSuites = [];
|
|
59
|
+
|
|
60
|
+
print('ConsoleReporter is deprecated and will be removed in a future version.');
|
|
58
61
|
|
|
59
62
|
this.jasmineStarted = function() {
|
|
60
63
|
specCount = 0;
|
|
@@ -89,9 +92,12 @@ getJasmineRequireObj().ConsoleReporter = function() {
|
|
|
89
92
|
printNewline();
|
|
90
93
|
var seconds = timer.elapsed() / 1000;
|
|
91
94
|
print('Finished in ' + seconds + ' ' + plural('second', seconds));
|
|
92
|
-
|
|
93
95
|
printNewline();
|
|
94
96
|
|
|
97
|
+
for(i = 0; i < failedSuites.length; i++) {
|
|
98
|
+
suiteFailureDetails(failedSuites[i]);
|
|
99
|
+
}
|
|
100
|
+
|
|
95
101
|
onComplete(failureCount === 0);
|
|
96
102
|
};
|
|
97
103
|
|
|
@@ -116,6 +122,13 @@ getJasmineRequireObj().ConsoleReporter = function() {
|
|
|
116
122
|
}
|
|
117
123
|
};
|
|
118
124
|
|
|
125
|
+
this.suiteDone = function(result) {
|
|
126
|
+
if (result.failedExpectations && result.failedExpectations.length > 0) {
|
|
127
|
+
failureCount++;
|
|
128
|
+
failedSuites.push(result);
|
|
129
|
+
}
|
|
130
|
+
};
|
|
131
|
+
|
|
119
132
|
return this;
|
|
120
133
|
|
|
121
134
|
function printNewline() {
|
|
@@ -160,6 +173,17 @@ getJasmineRequireObj().ConsoleReporter = function() {
|
|
|
160
173
|
|
|
161
174
|
printNewline();
|
|
162
175
|
}
|
|
176
|
+
|
|
177
|
+
function suiteFailureDetails(result) {
|
|
178
|
+
for (var i = 0; i < result.failedExpectations.length; i++) {
|
|
179
|
+
printNewline();
|
|
180
|
+
print(colored('red', 'An error was thrown in an afterAll'));
|
|
181
|
+
printNewline();
|
|
182
|
+
print(colored('red', 'AfterAll ' + result.failedExpectations[i].message));
|
|
183
|
+
|
|
184
|
+
}
|
|
185
|
+
printNewline();
|
|
186
|
+
}
|
|
163
187
|
}
|
|
164
188
|
|
|
165
189
|
return ConsoleReporter;
|
package/lib/jasmine-core/boot.js
CHANGED
|
@@ -21,7 +21,7 @@ OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
|
|
|
21
21
|
WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
|
|
22
22
|
*/
|
|
23
23
|
/**
|
|
24
|
-
Starting with version 2.0, this file "boots" Jasmine, performing all of the necessary initialization before executing the loaded environment and all of a project's specs. This file should be loaded after `jasmine.js`, but before any project source files or spec files are loaded. Thus this file can also be used to customize Jasmine for a project.
|
|
24
|
+
Starting with version 2.0, this file "boots" Jasmine, performing all of the necessary initialization before executing the loaded environment and all of a project's specs. This file should be loaded after `jasmine.js` and `jasmine_html.js`, but before any project source files or spec files are loaded. Thus this file can also be used to customize Jasmine for a project.
|
|
25
25
|
|
|
26
26
|
If a project is using Jasmine via the standalone distribution, this file can be customized directly. If a project is using Jasmine via the [Ruby gem][jasmine-gem], this file can be copied into the support directory via `jasmine copy_boot_js`. Other environments (e.g., Python) will have different mechanisms.
|
|
27
27
|
|
|
@@ -46,7 +46,8 @@ jasmineRequire.HtmlReporter = function(j$) {
|
|
|
46
46
|
failureCount = 0,
|
|
47
47
|
pendingSpecCount = 0,
|
|
48
48
|
htmlReporterMain,
|
|
49
|
-
symbols
|
|
49
|
+
symbols,
|
|
50
|
+
failedSuites = [];
|
|
50
51
|
|
|
51
52
|
this.initialize = function() {
|
|
52
53
|
clearPrior();
|
|
@@ -83,6 +84,10 @@ jasmineRequire.HtmlReporter = function(j$) {
|
|
|
83
84
|
};
|
|
84
85
|
|
|
85
86
|
this.suiteDone = function(result) {
|
|
87
|
+
if (result.status == 'failed') {
|
|
88
|
+
failedSuites.push(result);
|
|
89
|
+
}
|
|
90
|
+
|
|
86
91
|
if (currentParent == topResults) {
|
|
87
92
|
return;
|
|
88
93
|
}
|
|
@@ -96,7 +101,7 @@ jasmineRequire.HtmlReporter = function(j$) {
|
|
|
96
101
|
|
|
97
102
|
var failures = [];
|
|
98
103
|
this.specDone = function(result) {
|
|
99
|
-
if(noExpectations(result) && console && console.error) {
|
|
104
|
+
if(noExpectations(result) && typeof console !== 'undefined' && typeof console.error !== 'undefined') {
|
|
100
105
|
console.error('Spec \'' + result.fullName + '\' has no expectations.');
|
|
101
106
|
}
|
|
102
107
|
|
|
@@ -178,6 +183,15 @@ jasmineRequire.HtmlReporter = function(j$) {
|
|
|
178
183
|
|
|
179
184
|
alert.appendChild(createDom('span', {className: statusBarClassName}, statusBarMessage));
|
|
180
185
|
|
|
186
|
+
for(i = 0; i < failedSuites.length; i++) {
|
|
187
|
+
var failedSuite = failedSuites[i];
|
|
188
|
+
for(var j = 0; j < failedSuite.failedExpectations.length; j++) {
|
|
189
|
+
var errorBarMessage = 'AfterAll ' + failedSuite.failedExpectations[j].message;
|
|
190
|
+
var errorBarClassName = 'bar errored';
|
|
191
|
+
alert.appendChild(createDom('span', {className: errorBarClassName}, errorBarMessage));
|
|
192
|
+
}
|
|
193
|
+
}
|
|
194
|
+
|
|
181
195
|
var results = find('.results');
|
|
182
196
|
results.appendChild(summary);
|
|
183
197
|
|
|
@@ -30,6 +30,7 @@ body { overflow-y: scroll; }
|
|
|
30
30
|
.jasmine_html-reporter .bar.failed { background-color: #ca3a11; }
|
|
31
31
|
.jasmine_html-reporter .bar.passed { background-color: #007069; }
|
|
32
32
|
.jasmine_html-reporter .bar.skipped { background-color: #bababa; }
|
|
33
|
+
.jasmine_html-reporter .bar.errored { background-color: #ca3a11; }
|
|
33
34
|
.jasmine_html-reporter .bar.menu { background-color: #fff; color: #aaaaaa; }
|
|
34
35
|
.jasmine_html-reporter .bar.menu a { color: #333333; }
|
|
35
36
|
.jasmine_html-reporter .bar a { color: white; }
|