Fix unit tests and remove unused code
This commit is contained in:
17
test/api.js
17
test/api.js
@@ -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 ) {
|
||||
|
||||
@@ -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
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
1537
test/replies.json
1537
test/replies.json
File diff suppressed because it is too large
Load Diff
Reference in New Issue
Block a user