r99432 MediaWiki - Code Review archive

Repository:MediaWiki
Revision:r99431‎ | r99432 | r99433 >
Date:21:33, 10 October 2011
Author:neilk
Status:ok
Tags:
Comment:
ensured uri is scoped in a few tests
Modified paths:
  • /trunk/phase3/tests/jasmine/spec/mediawiki.Uri.spec.js (modified) (history)

Diff [purge]

Index: trunk/phase3/tests/jasmine/spec/mediawiki.Uri.spec.js
@@ -240,35 +240,34 @@
241241
242242 it( "should throw error on no arguments to constructor", function() {
243243 expect( function() {
244 - uri = new mw.Uri();
 244+ var uri = new mw.Uri();
245245 } ).toThrow( "Bad constructor arguments" );
246246 } );
247247
248248 it( "should throw error on empty string as argument to constructor", function() {
249249 expect( function() {
250 - uri = new mw.Uri( '' );
 250+ var uri = new mw.Uri( '' );
251251 } ).toThrow( "Bad constructor arguments" );
252252 } );
253253
254254 it( "should throw error on non-URI as argument to constructor", function() {
255255 expect( function() {
256 - uri = new mw.Uri( 'glaswegian penguins' );
 256+ var uri = new mw.Uri( 'glaswegian penguins' );
257257 } ).toThrow( "Bad constructor arguments" );
258258 } );
259259
260260 it( "should throw error on improper URI as argument to constructor", function() {
261261 expect( function() {
262 - uri = new mw.Uri( 'http:/foo.com' );
 262+ var uri = new mw.Uri( 'http:/foo.com' );
263263 } ).toThrow( "Bad constructor arguments" );
264264 } );
265265
266266 it( "should throw error on URI without protocol as argument to constructor", function() {
267267 expect( function() {
268 - uri = new mw.Uri( 'foo.com/bar/baz' );
 268+ var uri = new mw.Uri( 'foo.com/bar/baz' );
269269 } ).toThrow( "Bad constructor arguments" );
270270 } );
271271
272 -
273272 } );
274273
275274 } )();

Status & tagging log