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.
TP_ReactNative/test/action/setFavs.test.js

16 lines
494 B

import { Card } from "../../models/Card";
import { setFavList } from "../../redux/actions/action_setFavList";
import { setList } from "../../redux/actions/action_setFavs";
describe('setFavs',() => {
it('should take the list', () => {
const payload = [new Card("1","test1","",""),new Card("2","test2","","",true)];
const expectation = {
type: "SET_FAVS",
payload: payload,
};
expect(setList(payload)).toEqual(expectation);
})
})