From: Neil Kandalgaonkar Date: Mon, 10 Oct 2011 21:33:00 +0000 (+0000) Subject: ensured uri is scoped in a few tests X-Git-Tag: 1.31.0-rc.0~27161 X-Git-Url: http://git.cyclocoop.org/%40spipnet%40?a=commitdiff_plain;h=022e6ffecf3f19a9da13f77c3aca449a7ecfedeb;p=lhc%2Fweb%2Fwiklou.git ensured uri is scoped in a few tests --- 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" ); } ); - } ); } )();