Fix unit tests and remove unused code

This commit is contained in:
Samer Albahra
2018-07-22 19:31:38 -05:00
parent 1fa985e941
commit 616a0bda6f
8 changed files with 1551 additions and 315 deletions

View File

@@ -15,7 +15,7 @@ describe( "Weather API", function() {
loc: test,
key: process.env.WU_API_KEY,
expected: expected.WU[test],
callback: function( reply ) {
callback: function() {
done();
}
} );
@@ -30,7 +30,7 @@ describe( "Weather API", function() {
method: 0,
loc: test,
expected: expected.noWeather[test],
callback: function( reply ) {
callback: function() {
done();
}
} );
@@ -69,18 +69,19 @@ function setupMocks( location ) {
nock.cleanAll();
nock( "http://autocomplete.wunderground.com" )
.filteringPath( function( path ) {
return "/";
} )
.filteringPath( function() { return "/"; } )
.get( "/" )
.reply( 200, replies[location].WUautoComplete );
nock( "http://api.wunderground.com" )
.filteringPath( function( path ) {
return "/";
} )
.filteringPath( function() { return "/"; } )
.get( "/" )
.reply( 200, replies[location].WUyesterday );
nock( "http://api.openweathermap.org" )
.filteringPath( function() { return "/"; } )
.get( "/" )
.reply( 200, replies[location].OWMData );
}
function extend( target ) {

View File

@@ -6,7 +6,7 @@
"tz": 32,
"sunrise": 324,
"sunset": 1228,
"eip": 2130706433
"eip": null
}
},
"noWeather": {
@@ -14,9 +14,9 @@
"scale": -1,
"rd": -1,
"tz": 32,
"sunrise": 324,
"sunset": 1226,
"eip": 2130706433
"sunrise": 333,
"sunset": 1221,
"eip": null
}
}
}

File diff suppressed because it is too large Load Diff