From 022e6ffecf3f19a9da13f77c3aca449a7ecfedeb Mon Sep 17 00:00:00 2001 From: Neil Kandalgaonkar Date: Mon, 10 Oct 2011 21:33:00 +0000 Subject: [PATCH] ensured uri is scoped in a few tests --- tests/jasmine/spec/mediawiki.Uri.spec.js | 11 +++++------ 1 file changed, 5 insertions(+), 6 deletions(-) diff --git a/tests/jasmine/spec/mediawiki.Uri.spec.js b/tests/jasmine/spec/mediawiki.Uri.spec.js index 9171cdc2df..978ab6d15c 100644 --- a/tests/jasmine/spec/mediawiki.Uri.spec.js +++ b/tests/jasmine/spec/mediawiki.Uri.spec.js @@ -240,35 +240,34 @@ it( "should throw error on no arguments to constructor", function() { expect( function() { - uri = new mw.Uri(); + var uri = new mw.Uri(); } ).toThrow( "Bad constructor arguments" ); } ); it( "should throw error on empty string as argument to constructor", function() { expect( function() { - uri = new mw.Uri( '' ); + var uri = new mw.Uri( '' ); } ).toThrow( "Bad constructor arguments" ); } ); it( "should throw error on non-URI as argument to constructor", function() { expect( function() { - uri = new mw.Uri( 'glaswegian penguins' ); + var uri = new mw.Uri( 'glaswegian penguins' ); } ).toThrow( "Bad constructor arguments" ); } ); it( "should throw error on improper URI as argument to constructor", function() { expect( function() { - uri = new mw.Uri( 'http:/foo.com' ); + var uri = new mw.Uri( 'http:/foo.com' ); } ).toThrow( "Bad constructor arguments" ); } ); it( "should throw error on URI without protocol as argument to constructor", function() { expect( function() { - uri = new mw.Uri( 'foo.com/bar/baz' ); + var uri = new mw.Uri( 'foo.com/bar/baz' ); } ).toThrow( "Bad constructor arguments" ); } ); - } ); } )(); -- 2.20.1