Skip to content

Commit

Permalink
Add flag to disable complex async test in Rhino
Browse files Browse the repository at this point in the history
  • Loading branch information
Seth Kinast committed Apr 14, 2015
1 parent 3fa19b1 commit 52891cf
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 3 deletions.
1 change: 1 addition & 0 deletions test/jasmine-test/spec/coreTests.js
Original file line number Diff line number Diff line change
Expand Up @@ -942,6 +942,7 @@ var coreTests = [
message: "should reserve an async chunk for a stream reference and abort if the stream errors"
},
{
disabled_in_rhino: "Rhino can't handle this nested asynchronisity.",
name: "promise a stream and stream a promise",
source: ["Little Bobby drank and drank, ",
"and then he drank some more. ",
Expand Down
13 changes: 10 additions & 3 deletions test/jasmine-test/spec/renderTestSpec.js
Original file line number Diff line number Diff line change
@@ -1,25 +1,32 @@
/*global dust*/
var isRhino = typeof isRhino !== 'undefined';
describe ('Render', function() {
for (var index = 0; index < coreTests.length; index++) {
for (var i = 0; i < coreTests[index].tests.length; i++) {
var test = coreTests[index].tests[i];
it (test.message, render(test));
if (!isRhino || !test.disabled_in_rhino) {
it (test.message, render(test));
}
}
}
});
describe ('Stream', function() {
for (var index = 0; index < coreTests.length; index++) {
for (var i = 0; i < coreTests[index].tests.length; i++) {
var test = coreTests[index].tests[i];
it (test.message, stream(test));
if (!isRhino || !test.disabled_in_rhino) {
it (test.message, stream(test));
}
}
}
});
describe ('Pipe', function() {
for (var index = 0; index < coreTests.length; index++) {
for (var i = 0; i < coreTests[index].tests.length; i++) {
var test = coreTests[index].tests[i];
it (test.message, pipe(test));
if (!isRhino || !test.disabled_in_rhino) {
it (test.message, pipe(test));
}
}
}
});
Expand Down
2 changes: 2 additions & 0 deletions test/rhino/rhinoTest.js
Original file line number Diff line number Diff line change
@@ -1,5 +1,7 @@
var window = this;

var isRhino = true;

print('Running unit tests with ' + environment['java.class.path']);

var requiredFiles = [
Expand Down

0 comments on commit 52891cf

Please sign in to comment.