Skip to content

Commit

Permalink
Final cleanups
Browse files Browse the repository at this point in the history
  • Loading branch information
veeck committed Oct 20, 2022
1 parent 4094ebb commit 6cd8557
Show file tree
Hide file tree
Showing 3 changed files with 3 additions and 4 deletions.
4 changes: 2 additions & 2 deletions modules/default/weather/providers/weathergov.js
Original file line number Diff line number Diff line change
Expand Up @@ -171,7 +171,7 @@ WeatherProvider.register("weathergov", {
const days = [];

// variable for date
let weather = new WeatherObject(this.config.units, this.config.tempUnits, this.config.windUnits, this.config.useKmh);
let weather = new WeatherObject();
for (const forecast of forecasts) {
weather.date = moment(forecast.startTime.slice(0, 19));
if (forecast.windSpeed.search(" ") < 0) {
Expand All @@ -187,7 +187,7 @@ WeatherProvider.register("weathergov", {

days.push(weather);

weather = new WeatherObject(this.config.units, this.config.tempUnits, this.config.windUnits, this.config.useKmh);
weather = new WeatherObject();
}

// push weather information to days array
Expand Down
1 change: 0 additions & 1 deletion tests/e2e/modules/weather_current_spec.js
Original file line number Diff line number Diff line change
@@ -1,4 +1,3 @@
const moment = require("moment");
const helpers = require("../helpers/global-setup");
const weatherFunc = require("../helpers/weather-functions");

Expand Down
2 changes: 1 addition & 1 deletion tests/unit/functions/weather_object_spec.js
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ describe("WeatherObject", () => {
beforeAll(() => {
originalTimeZone = moment.tz.guess();
moment.tz.setDefault("Africa/Dar_es_Salaam");
weatherobject = new WeatherObject("metric", "metric", "metric", true);
weatherobject = new WeatherObject();
});

it("should return true for daytime at noon", () => {
Expand Down

0 comments on commit 6cd8557

Please sign in to comment.