Refactor watering scale logic flow
This commit is contained in:
@@ -5,7 +5,7 @@ import * as MockExpressResponse from 'mock-express-response';
|
||||
import * as MockDate from 'mockdate';
|
||||
|
||||
import { getWateringData } from './weather';
|
||||
import { GeoCoordinates, WateringData, WeatherData } from "../types";
|
||||
import { GeoCoordinates, ZimmermanWateringData, WeatherData } from "../types";
|
||||
import { WeatherProvider } from "./weatherProviders/WeatherProvider";
|
||||
|
||||
const expected = require( '../test/expected.json' );
|
||||
@@ -77,7 +77,7 @@ export class MockWeatherProvider extends WeatherProvider {
|
||||
this.mockData = mockData;
|
||||
}
|
||||
|
||||
public async getWateringData( coordinates: GeoCoordinates ): Promise< WateringData > {
|
||||
public async getWateringData( coordinates: GeoCoordinates ): Promise< ZimmermanWateringData > {
|
||||
const data = this.mockData.wateringData;
|
||||
if ( !data.weatherProvider ) {
|
||||
data.weatherProvider = "mock";
|
||||
@@ -97,6 +97,6 @@ export class MockWeatherProvider extends WeatherProvider {
|
||||
}
|
||||
|
||||
interface MockWeatherData {
|
||||
wateringData?: WateringData,
|
||||
wateringData?: ZimmermanWateringData,
|
||||
weatherData?: WeatherData
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user