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

21 lines
483 B
TypeScript
Raw Normal View History

2018-12-30 11:57:22 -07:00
import { Coordinate } from "farmbot";
import { VariableNameSet } from "../resources/interfaces";
2019-06-04 16:07:52 -06:00
export const fakeVariableNameSet = (
2020-02-28 09:35:32 -07:00
label = "parent", vector = { x: 0, y: 0, z: 0 },
2019-06-04 16:07:52 -06:00
): VariableNameSet => {
2018-12-30 11:57:22 -07:00
const data_value: Coordinate = {
2019-06-04 16:07:52 -06:00
kind: "coordinate", args: vector
2018-12-30 11:57:22 -07:00
};
return {
[label]: {
celeryNode: {
2019-02-22 19:09:40 -07:00
kind: "parameter_application",
2018-12-30 11:57:22 -07:00
args: { label, data_value }
},
2019-06-04 16:07:52 -06:00
dropdown: { label, value: "" },
vector,
2018-12-30 11:57:22 -07:00
}
};
};