Permalink
Browse files
Fixed test suite so that it runs in IE7
- Loading branch information...
Showing
with
3 additions
and
3 deletions.
-
+3
−3
test/tests.js
|
|
@@ -1,4 +1,4 @@ |
|
|
-function log(message) { if (console && console.log) console.log(message); }
|
|
|
+window.console == null && (window.console = { log: function() {} });
|
|
|
|
|
|
$(document).ready(function() {
|
|
|
function shouldScore(charScores, string, abbreviation) {
|
|
@@ -13,9 +13,9 @@ $(document).ready(function() { |
|
|
var pass = (expectedScore == roundedScore);
|
|
|
var result = (pass) ? "pass" : "fail";
|
|
|
|
|
|
- log(string + " ~ " + abbreviation + " : " + scoreArray);
|
|
|
+ console.log(string + " ~ " + abbreviation + " : " + scoreArray);
|
|
|
|
|
|
- var blip = pass ? "✓" : "☠"
|
|
|
+ var blip = pass ? "✓" : "☠";
|
|
|
if (!pass) {
|
|
|
var message = "LiquidMetal.score('" + string + "', '" + abbreviation + "') should match " + expectedScore + " but was " + score;
|
|
|
$("#errors").append($("<div></div>").addClass(result).text(message));
|
|
|
0 comments on commit
a5a03fb