cabana/src/__tests__/components/CanGraph.test.js

32 lines
780 B
JavaScript
Raw Normal View History

2017-12-12 19:27:20 -07:00
global.__JEST__ = 1;
2017-12-12 19:27:20 -07:00
import CanGraph from "../../components/CanGraph";
import React from "react";
import { shallow, mount, render } from "enzyme";
2017-12-12 19:27:20 -07:00
test("CanGraph successfully mounts with minimal default props", () => {
const component = shallow(
<CanGraph
onGraphRefAvailable={() => {}}
unplot={() => {}}
messages={{}}
messageId={null}
messageName={null}
signalSpec={null}
onSegmentChanged={() => {}}
segment={[]}
data={{}}
onRelativeTimeClick={() => {}}
currentTime={0}
onDragStart={() => {}}
onDragEnd={() => {}}
container={null}
dragPos={null}
canReceiveGraphDrop={false}
plottedSignals={[]}
live={true}
/>
2017-12-12 19:27:20 -07:00
);
expect(component.exists()).toBe(true);
});