Farmbot-Web-App/frontend/__test_support__/fake_state.ts

20 lines
520 B
TypeScript
Raw Normal View History

2017-06-29 12:54:02 -06:00
import { noop } from "lodash";
import { Everything } from "../interfaces";
import { auth } from "./fake_state/token";
import { bot } from "./fake_state/bot";
import { config } from "./fake_state/config";
import { draggable } from "./fake_state/draggable";
import { resources } from "./fake_state/resources";
/** Factory function for empty state object. */
export function fakeState(_: Function = noop): Everything {
2017-06-29 12:54:02 -06:00
return {
dispatch: jest.fn(),
auth,
bot,
config,
draggable,
2018-09-20 17:21:52 -06:00
resources
};
2017-06-29 12:54:02 -06:00
}