Skip to content

Commit

Permalink
Unit Test: changing skip behavior, no longer throws error
Browse files Browse the repository at this point in the history
  • Loading branch information
jakearchibald committed Sep 10, 2009
1 parent 005d59a commit 8e5b5ac
Show file tree
Hide file tree
Showing 4 changed files with 8 additions and 9 deletions.
2 changes: 1 addition & 1 deletion test/glow/embed/embed.js
Expand Up @@ -35,7 +35,7 @@ t.test("Test Embedding", function() {
movie.embed();

if (!movie.movie) {
t.skip("Flash 9 or greater required");
t.skip("Flash 9 or greater required"); return;
}

t.ok(movie.movie.nodeName.toLowerCase() == embed_tag, "Movie property references Flash")
Expand Down
2 changes: 1 addition & 1 deletion test/glow/glow.js
Expand Up @@ -8,7 +8,7 @@ t.test("Basic requirements", function() {

t.test("Simple DOM Ready testing", function() {
t.expect(4);
if (glow.isReady) { t.skip("DOM already ready"); }
if (glow.isReady) { t.skip("DOM already ready"); return; }
t.stop();

var firstFired = false;
Expand Down
12 changes: 6 additions & 6 deletions test/glow/net/net.js
Expand Up @@ -69,7 +69,7 @@ t.test("glow.net.get aync header setting", function() {
onLoad: function(response) {
if (/^<!--#printEnv -->/.test(response.text())) {
t.start();
t.skip("This test requires a web server running mod_include in shtml files");
t.skip("This test requires a web server running mod_include in shtml files"); return;
}
t.ok(true, "correct callback used");
t.ok(/REQUEST_METHOD=GET/.test(response.text()), "Using get method");
Expand Down Expand Up @@ -156,7 +156,7 @@ t.test("glow.net.post aync string", function() {
onLoad: function(response) {
if (/^<!--#printEnv -->/.test(response.text())) {
t.start();
t.skip("This test requires a web server running mod_include in shtml files");
t.skip("This test requires a web server running mod_include in shtml files"); return;
}
t.ok(true, "correct callback used");
t.equals(/REQUEST_METHOD=(\w+)/.exec(response.text())[1], "POST", "Using post method");
Expand All @@ -180,7 +180,7 @@ t.test("glow.net.post aync json", function() {
onLoad: function(response) {
if (/^<!--#printEnv -->/.test(response.text())) {
t.start();
t.skip("This test requires a web server running mod_include in shtml files");
t.skip("This test requires a web server running mod_include in shtml files"); return;
}
t.ok(true, "correct callback used");
t.equals(/REQUEST_METHOD=(\w+)/.exec(response.text())[1], "POST", "Using post method");
Expand Down Expand Up @@ -264,12 +264,12 @@ function testForRewriteAndHeaders(successCallback) {
successCallback();
} else {
t.start();
t.skip("mod_headers not enabled");
t.skip("mod_headers not enabled"); return;
}
},
onError: function() {
t.start();
t.skip("mod_rewrite / htaccess not enabled");
t.skip("mod_rewrite / htaccess not enabled"); return;
}
});
}
Expand Down Expand Up @@ -399,7 +399,7 @@ t.test("glow.net.loadScript aborting", function() {
timeout: 2
});
if (request.completed) {
t.skip("Request complete, too late to abort");
t.skip("Request complete, too late to abort"); return;
}
request.abort();

Expand Down
1 change: 0 additions & 1 deletion test/unittest.js
Expand Up @@ -329,7 +329,6 @@ UnitTest.prototype = {
skip: function(reason) {
reason = reason || "Skipped";
this.currentTest.skipped = reason;
throw "Test skipped";
},
/*
Method: ok
Expand Down

0 comments on commit 8e5b5ac

Please sign in to comment.