Skip to content

HTTPS clone URL

Subversion checkout URL

You can clone with HTTPS or Subversion.

Download ZIP
Browse files

run all tests after focused run if console.log was used

  • Loading branch information...
commit c67f8dbadf0e741b5821aa74174fd5a459aec5cd 1 parent f82e3c0
@johnbintz johnbintz authored
View
14 ext/jasmine-webkit-specrunner/specrunner.cpp
@@ -319,11 +319,21 @@ void HeadlessSpecRunner::timerEvent(QTimerEvent *event)
}
}
- if ((exitCode == 0 && runnerFiles.count() == 0) || (exitCode != 0)) {
- QApplication::instance()->exit(exitCode);
+ bool runAgain = true;
+
+ if (runnerFiles.count() == 0) {
+ runAgain = false;
} else {
+ if (exitCode == 1) {
+ runAgain = false;
+ }
+ }
+
+ if (runAgain) {
isFinished = false;
loadSpec();
+ } else {
+ QApplication::instance()->exit(exitCode);
}
}
View
7 spec/bin/jasmine-headless-webkit_spec.rb
@@ -88,6 +88,13 @@
report.should be_a_report_containing(2, 0, false)
end
+
+ it "should succeed and run both, with the first having a console.log call" do
+ system %{bin/jasmine-headless-webkit -j spec/jasmine/filtered_success_with_console/filtered_success.yml --report #{report} ./spec/jasmine/filtered_success_with_console/success_one_spec.js}
+ $?.exitstatus.should == 2
+
+ report.should be_a_report_containing(2, 0, true)
+ end
end
end
end
View
10 spec/jasmine/filtered_success_with_console/filtered_success.yml
@@ -0,0 +1,10 @@
+src_files:
+ - spec/jasmine/filtered_success_with_console/src.js
+
+spec_files:
+ - spec/jasmine/filtered_success_with_console/*_spec.js
+
+src_dir: .
+spec_dir: .
+
+
View
0  spec/jasmine/filtered_success_with_console/src.js
No changes.
View
7 spec/jasmine/filtered_success_with_console/success_one_spec.js
@@ -0,0 +1,7 @@
+describe('success', function() {
+ it('should succeed', function() {
+ console.log("made it");
+ expect(true).toEqual(true);
+ });
+});
+
View
6 spec/jasmine/filtered_success_with_console/success_two_spec.js
@@ -0,0 +1,6 @@
+describe('also success', function() {
+ it('should succeed', function() {
+ expect(true).toEqual(true);
+ });
+});
+
Please sign in to comment.
Something went wrong with that request. Please try again.