Permalink
Browse files

Fixed test suite so that it runs in IE7

  • Loading branch information...
rmm5t committed Apr 21, 2012
1 parent 3235191 commit a5a03fb2daeb0616979744082785a15f7d433444
Showing with 3 additions and 3 deletions.
  1. +3 −3 test/tests.js
View
@@ -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

Please sign in to comment.