From 526f6c565caf26e0746a344e9999fa050a0a4078 Mon Sep 17 00:00:00 2001 From: =?utf8?q?J=C3=B6rn=20Zaefferer?= Date: Tue, 15 Sep 2009 08:25:00 +0000 Subject: [PATCH] slider tests: fixing variable scopes --- tests/unit/slider/slider_methods.js | 4 ++-- tests/unit/slider/slider_options.js | 2 ++ 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/tests/unit/slider/slider_methods.js b/tests/unit/slider/slider_methods.js index 92d8237b9..711c16f2c 100644 --- a/tests/unit/slider/slider_methods.js +++ b/tests/unit/slider/slider_methods.js @@ -20,7 +20,7 @@ test("init", function() { $('
').slider().slider("foo").remove(); ok(true, 'arbitrary method called after init'); - el = $('
').slider(); + var el = $('
').slider(); var foo = el.data("foo.slider"); el.remove(); ok(true, 'arbitrary option getter after init'); @@ -44,7 +44,7 @@ test("destroy", function() { $('
').slider().slider("destroy").slider("foo").remove(); ok(true, 'arbitrary method called after destroy'); - el = $('
').slider(); + var el = $('
').slider(); var foo = el.slider("destroy").data("foo.slider"); el.remove(); ok(true, 'arbitrary option getter (.data) after destroy'); diff --git a/tests/unit/slider/slider_options.js b/tests/unit/slider/slider_options.js index cc624a0e3..88eb26a8f 100644 --- a/tests/unit/slider/slider_options.js +++ b/tests/unit/slider/slider_options.js @@ -3,6 +3,8 @@ */ (function($) { +var el, options; + function handle() { return el.find(".ui-slider-handle"); } -- 2.39.5