Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

Version bump to 0.10.4

  • Loading branch information...
commit c187adc09620e773a825ba4e619bb17cb2242b56 1 parent 5aa306c
Pivotal authored
View
12 example/example_runner.html
@@ -3,15 +3,13 @@
<html>
<head>
<title>Jasmine Test Runner</title>
+ <link rel="stylesheet" type="text/css" href="../lib/jasmine.css">
+ <script type="text/javascript" src="../lib/jasmine-0.10.4.js"></script>
+ <script type="text/javascript" src="../lib/TrivialReporter.js"></script>
+ <script type="text/javascript" src="../lib/consolex.js"></script>
+ <script type="text/javascript" src="spec/example_suite.js"></script>
</head>
-<script type="text/javascript" src="../lib/jasmine-0.10.3.js"></script>
-<script type="text/javascript" src="../lib/TrivialReporter.js"></script>
-<script type="text/javascript" src="../lib/consolex.js"></script>
-<script type="text/javascript" src="spec/example_suite.js"></script>
-<link rel="stylesheet" type="text/css" href="../lib/jasmine.css">
-
<body>
-
<script type="text/javascript">
var jasmineEnv = jasmine.getEnv();
jasmineEnv.reporter = new jasmine.TrivialReporter();
View
34 lib/jasmine-0.10.3.js → lib/jasmine-0.10.4.js
@@ -57,6 +57,10 @@ jasmine.MessageResult = function(text) {
this.trace = new Error(); // todo: test better
};
+jasmine.MessageResult.prototype.toString = function() {
+ return this.text;
+};
+
jasmine.ExpectationResult = function(params) {
this.type = 'ExpectationResult';
this.matcherName = params.matcherName;
@@ -71,6 +75,10 @@ jasmine.ExpectationResult = function(params) {
this.trace = this.passed_ ? '' : new Error(this.message);
};
+jasmine.ExpectationResult.prototype.toString = function () {
+ return this.message;
+};
+
jasmine.ExpectationResult.prototype.passed = function () {
return this.passed_;
};
@@ -741,10 +749,21 @@ jasmine.Env.prototype.describe = function(description, specDefinitions) {
this.currentSuite = suite;
- specDefinitions.call(suite);
+ var declarationError = null;
+ try {
+ specDefinitions.call(suite);
+ } catch(e) {
+ declarationError = e;
+ }
this.currentSuite = parentSuite;
+ if (declarationError) {
+ this.it("encountered a declaration exception", function() {
+ throw declarationError;
+ });
+ }
+
return suite;
};
@@ -1777,12 +1796,12 @@ jasmine.Runner.prototype.execute = function() {
jasmine.Runner.prototype.beforeEach = function(beforeEachFunction) {
beforeEachFunction.typeName = 'beforeEach';
- this.before_.push(beforeEachFunction);
+ this.before_.splice(0,0,beforeEachFunction);
};
jasmine.Runner.prototype.afterEach = function(afterEachFunction) {
afterEachFunction.typeName = 'afterEach';
- this.after_.push(afterEachFunction);
+ this.after_.splice(0,0,afterEachFunction);
};
@@ -2063,12 +2082,12 @@ jasmine.Suite.prototype.finish = function(onComplete) {
jasmine.Suite.prototype.beforeEach = function(beforeEachFunction) {
beforeEachFunction.typeName = 'beforeEach';
- this.before_.push(beforeEachFunction);
+ this.before_.unshift(beforeEachFunction);
};
jasmine.Suite.prototype.afterEach = function(afterEachFunction) {
afterEachFunction.typeName = 'afterEach';
- this.after_.push(afterEachFunction);
+ this.after_.unshift(afterEachFunction);
};
jasmine.Suite.prototype.results = function() {
@@ -2139,7 +2158,6 @@ jasmine.WaitsForBlock.prototype.execute = function (onComplete) {
name: 'timeout',
message: message
});
- onComplete();
} else {
self.totalTimeSpentWaitingForLatch += jasmine.WaitsForBlock.TIMEOUT_INCREMENT;
self.env.setTimeout(function () { self.execute(onComplete); }, jasmine.WaitsForBlock.TIMEOUT_INCREMENT);
@@ -2326,6 +2344,6 @@ window.clearInterval = function(timeoutKey) {
jasmine.version_= {
"major": 0,
"minor": 10,
- "build": 3,
- "revision": 1270162784
+ "build": 4,
+ "revision": 1275748595
};
View
2  src/version.json
@@ -1,5 +1,5 @@
{
"major": 0,
"minor": 10,
- "build": 3
+ "build": 4
}
Please sign in to comment.
Something went wrong with that request. Please try again.