Add missing var declarations in unit tests.
This commit is contained in:
parent
b5b3b66a89
commit
26ca9c3969
|
@ -452,7 +452,7 @@ Test.Unit.Assertions = {
|
|||
},
|
||||
|
||||
assertElementsMatch: function() {
|
||||
var pass = true, expressions = $A(arguments), elements = $A(expressions.shift());
|
||||
var message, pass = true, expressions = $A(arguments), elements = $A(expressions.shift());
|
||||
if (elements.length != expressions.length) {
|
||||
message = this.buildMessage('assertElementsMatch', 'size mismatch: ? elements, ? expressions (?).', elements.length, expressions.length, expressions);
|
||||
this.flunk(message);
|
||||
|
|
|
@ -195,8 +195,7 @@ new Test.Unit.Runner({
|
|||
},
|
||||
|
||||
testNewElementInsert: function() {
|
||||
var container = new Element('div');
|
||||
element = new Element('div');
|
||||
var container = new Element('div'), element = new Element('div');
|
||||
container.insert(element);
|
||||
|
||||
element.insert({ before: '<p>a paragraph</p>' });
|
||||
|
|
|
@ -299,7 +299,7 @@ new Test.Unit.Runner({
|
|||
},
|
||||
|
||||
testFormRequest: function() {
|
||||
request = $("form").request();
|
||||
var request = $("form").request();
|
||||
this.assert($("form").hasAttribute("method"));
|
||||
this.assert(request.url.include("fixtures/empty.js?val1=4"));
|
||||
this.assertEqual("get", request.method);
|
||||
|
|
|
@ -275,8 +275,8 @@ new Test.Unit.Runner({
|
|||
},
|
||||
|
||||
testTemplateEvaluationWithFalses: function() {
|
||||
var source = '<tr><td>#{zero}</td><td>#{false_}</td><td>#{undef}</td><td>#{null_}</td><td>#{empty}</td></tr>';
|
||||
var falses = {zero:0, false_:false, undef:undefined, null_:null, empty:""};
|
||||
var source = '<tr><td>#{zero}</td><td>#{_false}</td><td>#{undef}</td><td>#{_null}</td><td>#{empty}</td></tr>';
|
||||
var falses = {zero:0, _false:false, undef:undefined, _null:null, empty:""};
|
||||
var template = new Template(source);
|
||||
|
||||
this.assertEqual('<tr><td>0</td><td>false</td><td></td><td></td><td></td></tr>',
|
||||
|
|
Loading…
Reference in New Issue