You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

19 lines
537 B

import { WEATHER_DATA } from "../../data/stub";
import { setWeatherList } from "../../redux/actions/Action";
import { FETCH_WEATHER } from "../../redux/constants";
describe('setWeatherList', () => {
it('should create an action with the correct type and payload', () => {
const weathers = [WEATHER_DATA[0],WEATHER_DATA[1]];
const expectedAction = {
type: FETCH_WEATHER,
payload: weathers,
cities: [],
};
const action = setWeatherList(weathers);
expect(action).toEqual(expectedAction);
});
});