From c850121e9b2f3c85131d1bc8e261d8253d50f790 Mon Sep 17 00:00:00 2001 From: Chris Adams Date: Wed, 26 Jun 2013 16:54:37 -0400 Subject: [PATCH] Tests: avoid leaking into global scope This means that this will pass without error: http://127.0.0.1:8000/test/test.html?noglobals=true --- test/basic.js | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/test/basic.js b/test/basic.js index 0d13e844..bd8b731f 100644 --- a/test/basic.js +++ b/test/basic.js @@ -1,3 +1,5 @@ +/* global module, asyncTest, $, ok, equal, notEqual, start, test, Util */ + (function() { module('Basic'); @@ -86,8 +88,9 @@ // ---------- asyncTest('Click', function() { - var viewport = viewer.viewport; - center = viewport.getCenter(); + var viewport = viewer.viewport, + center = viewport.getCenter(); + ok(center.x === 0.5 && center.y === 0.5, 'We start out unpanned'); equal(viewport.getZoom(), 1, 'We start out unzoomed');