From 78c4b99df780bdcd29c447a0b04725088e37ef88 Mon Sep 17 00:00:00 2001 From: Tobie Langel Date: Sun, 16 Mar 2008 20:00:07 +0000 Subject: [PATCH] prototype: Instanciate Test.Unit.Logger on window load. --- CHANGELOG | 4 ++++ test/lib/unittest.js | 4 ++-- 2 files changed, 6 insertions(+), 2 deletions(-) diff --git a/CHANGELOG b/CHANGELOG index 64cc945..69dbad7 100644 --- a/CHANGELOG +++ b/CHANGELOG @@ -1,3 +1,7 @@ +* Instanciate Test.Unit.Logger on window load. [Tobie Langel] + +* Unit tests clean-up. [Tobie Langel] + * Refactor String#escapeHTML to avoid using the `with` statement. [Tobie Langel] * Remove usage of the `with` statement from unit tests. [Tobie Langel] diff --git a/test/lib/unittest.js b/test/lib/unittest.js index 0e0fb36..e32617b 100644 --- a/test/lib/unittest.js +++ b/test/lib/unittest.js @@ -155,12 +155,12 @@ Test.Unit.Runner = Class.create({ }, arguments[1] || {}); options.resultsURL = this.queryParams.resultsURL; - options.testLog = $(options.testLog); this.tests = this.getTests(testcases); this.currentTest = 0; - this.logger = new Test.Unit.Logger(options.testLog); + Event.observe(window, "load", function() { + this.logger = new Test.Unit.Logger($(options.testLog)); this.runTests.bind(this).delay(0.1); }.bind(this)); },