Skip to content

Commit 9b8f025

Browse files
Trottrvagg
authored andcommitted
test: fix redeclared vars in test-url
PR-URL: #4993 Reviewed-By: Michaël Zasso <[email protected]> Reviewed-By: James M Snell <[email protected]> Reviewed-By: Colin Ihrig <[email protected]>
1 parent 51fb884 commit 9b8f025

File tree

1 file changed

+13
-13
lines changed

1 file changed

+13
-13
lines changed

‎test/parallel/test-url.js‎

Lines changed: 13 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -856,10 +856,10 @@ var parseTests ={
856856

857857
};
858858

859-
for(varuinparseTests){
860-
varactual=url.parse(u);
861-
varspaced=url.parse(' \t '+u+'\n\t');
862-
varexpected=parseTests[u];
859+
for(constuinparseTests){
860+
letactual=url.parse(u);
861+
constspaced=url.parse(` \t ${u}\n\t`);
862+
letexpected=parseTests[u];
863863

864864
Object.keys(actual).forEach(function(i){
865865
if(expected[i]===undefined&&actual[i]===null){
@@ -928,10 +928,10 @@ var parseTestsWithQueryString ={
928928
href: '/example?query=value'
929929
}
930930
};
931-
for(varuinparseTestsWithQueryString){
932-
varactual=url.parse(u,true);
933-
varexpected=parseTestsWithQueryString[u];
934-
for(variinactual){
931+
for(constuinparseTestsWithQueryString){
932+
constactual=url.parse(u,true);
933+
constexpected=parseTestsWithQueryString[u];
934+
for(constiinactual){
935935
if(actual[i]===null&&expected[i]===undefined){
936936
expected[i]=null;
937937
}
@@ -1130,11 +1130,11 @@ var formatTests ={
11301130
pathname: '/fooA100%mBr',
11311131
}
11321132
};
1133-
for(varuinformatTests){
1134-
varexpect=formatTests[u].href;
1133+
for(constuinformatTests){
1134+
constexpect=formatTests[u].href;
11351135
deleteformatTests[u].href;
1136-
varactual=url.format(u);
1137-
varactualObj=url.format(formatTests[u]);
1136+
constactual=url.format(u);
1137+
constactualObj=url.format(formatTests[u]);
11381138
assert.equal(actual,expect,
11391139
'wonky format('+u+') == '+expect+
11401140
'\nactual:'+actual);
@@ -1567,7 +1567,7 @@ var throws = [
15671567
0,
15681568
function(){}
15691569
];
1570-
for(vari=0;i<throws.length;i++){
1570+
for(leti=0;i<throws.length;i++){
15711571
assert.throws(function(){url.format(throws[i]);},TypeError);
15721572
}
15731573
assert(url.format('')==='');

0 commit comments

Comments
(0)