26 lines
700 B
JavaScript
26 lines
700 B
JavaScript
import React from 'react';
|
|
import { shallow, mount, render } from 'enzyme';
|
|
|
|
import SaveDbcModal from '../../components/SaveDbcModal';
|
|
import OpenDbc from '../../api/OpenDbc';
|
|
import DBC from '../../models/can/dbc';
|
|
|
|
global.__JEST__ = 1;
|
|
|
|
test('SaveDbcModal successfully mounts with minimal default props', () => {
|
|
const openDbcClient = new OpenDbc(null);
|
|
const dbc = new DBC();
|
|
const component = shallow(
|
|
<SaveDbcModal
|
|
dbc={dbc}
|
|
sourceDbcFilename=""
|
|
onDbcSaved={() => {}}
|
|
handleClose={() => {}}
|
|
openDbcClient={openDbcClient}
|
|
hasGithubAuth={false}
|
|
loginWithGithub={<p>Login with github</p>}
|
|
/>
|
|
);
|
|
expect(component.exists()).toBe(true);
|
|
});
|