Skip to content

Commit

Permalink
Merge pull request open-source-labs#4 from oslabs-beta/staging
Browse files Browse the repository at this point in the history
Left panel testing
  • Loading branch information
frakes413 authored Sep 30, 2020
2 parents b6f6124 + ef7dee8 commit 7abb751
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 7abb751

Please sign in to comment.