Skip to content

Commit

Permalink
Left panel testing started
Browse files Browse the repository at this point in the history
  • Loading branch information
caseyescovedo committed Sep 30, 2020
1 parent b6f6124 commit 3004a55
Showing 1 changed file with 39 additions and 0 deletions.
39 changes: 39 additions & 0 deletions __tests__/compareTests.jsx
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
import * as React from "react";
import * as renderer from "react-test-renderer";
import { Compare } from "../frontend/components//leftPanel/Compare";
import { shallow } from "enzyme";
import { stringify } from "querystring";

describe ("Comparison feature tests", () => {
// wrapper will be assigned the evaluation of the shallow render
let wrapper;

const props = {
queries: [],
currentSchema: '',

}
// shallow render the component before running tests
beforeAll(() => {
wrapper = shallow(<Compare {...props}/>)
})

it('Should render a div', () => {
expect(wrapper.type()).toEqual('div');
})

it('Should render h3 tag', () => {
expect(wrapper.containsMatchingElement(
<h3>Comparisons</h3>)).toBeTruthy();
})

it('Should render query label', () => {
expect(wrapper.containsMatchingElement(
<td>{'Query Label'}</td>)).toBeTruthy();
})





})

0 comments on commit 3004a55

Please sign in to comment.