2019-10-07 17:11:53 -06:00
|
|
|
import React from 'react';
|
|
|
|
import { shallow, mount, render } from 'enzyme';
|
|
|
|
import GithubDbcList from '../../components/GithubDbcList';
|
2017-08-08 15:30:59 -06:00
|
|
|
|
2019-10-07 17:11:53 -06:00
|
|
|
import OpenDbc from '../../api/OpenDbc';
|
2017-08-08 15:30:59 -06:00
|
|
|
|
2019-10-07 17:11:53 -06:00
|
|
|
global.__JEST__ = 1;
|
2017-08-08 15:30:59 -06:00
|
|
|
|
2019-10-07 17:11:53 -06:00
|
|
|
test('GithubDbcList successfully mounts with minimal default props', () => {
|
2017-12-12 19:27:20 -07:00
|
|
|
const openDbcClient = new OpenDbc(null);
|
2017-08-08 15:30:59 -06:00
|
|
|
|
2017-12-12 19:27:20 -07:00
|
|
|
const component = shallow(
|
|
|
|
<GithubDbcList
|
|
|
|
onDbcLoaded={() => {}}
|
|
|
|
repo="commaai/opendbc"
|
|
|
|
openDbcClient={openDbcClient}
|
|
|
|
/>
|
|
|
|
);
|
|
|
|
expect(component.exists()).toBe(true);
|
2017-08-08 15:30:59 -06:00
|
|
|
});
|