From 6e080aa186911371c17600ad83f7655057bea213 Mon Sep 17 00:00:00 2001 From: Thomas Fuchs Date: Fri, 23 Nov 2007 11:55:42 +0000 Subject: [PATCH] Add a test to check that defer handles arguments correctly --- test/unit/base.html | 9 ++++++++- 1 file changed, 8 insertions(+), 1 deletion(-) diff --git a/test/unit/base.html b/test/unit/base.html index 267963e..2cb1524 100644 --- a/test/unit/base.html +++ b/test/unit/base.html @@ -213,9 +213,16 @@ window.deferred = undefined; var deferredFunction = function() { window.deferred = true; }; deferredFunction.defer(); - assertUndefined(window.deferred); + assertUndefined(window.deferred); wait(50, function() { assert(window.deferred); + + window.deferredValue = 0; + var deferredFunction2 = function(arg) { window.deferredValue = arg; }; + deferredFunction2.defer('test'); + wait(50, function() { + assertEqual('test', window.deferredValue); + }); }); }},