test(jest): cleanup console warnings/errors (#6547)
This commit is contained in:
@@ -29,7 +29,6 @@ describe("<ResponseBody />", function() {
|
|||||||
it("renders ResponseBody as 'image/svg'", function() {
|
it("renders ResponseBody as 'image/svg'", function() {
|
||||||
props.contentType = "image/svg"
|
props.contentType = "image/svg"
|
||||||
const wrapper = shallow(<ResponseBody {...props}/>)
|
const wrapper = shallow(<ResponseBody {...props}/>)
|
||||||
console.warn(wrapper.debug())
|
|
||||||
expect(wrapper.find("highlightCodeComponent").length).toEqual(0)
|
expect(wrapper.find("highlightCodeComponent").length).toEqual(0)
|
||||||
})
|
})
|
||||||
|
|
||||||
@@ -37,7 +36,6 @@ describe("<ResponseBody />", function() {
|
|||||||
props.contentType = "text/plain"
|
props.contentType = "text/plain"
|
||||||
props.content = "test text"
|
props.content = "test text"
|
||||||
const wrapper = shallow(<ResponseBody {...props}/>)
|
const wrapper = shallow(<ResponseBody {...props}/>)
|
||||||
console.warn(wrapper.debug())
|
|
||||||
expect(wrapper.find("highlightCodeComponent[canCopy]").length).toEqual(1)
|
expect(wrapper.find("highlightCodeComponent[canCopy]").length).toEqual(1)
|
||||||
})
|
})
|
||||||
})
|
})
|
||||||
|
|||||||
@@ -2,14 +2,16 @@ import React from "react"
|
|||||||
import { shallow } from "enzyme"
|
import { shallow } from "enzyme"
|
||||||
import { fromJS, Map } from "immutable"
|
import { fromJS, Map } from "immutable"
|
||||||
import Models from "components/models"
|
import Models from "components/models"
|
||||||
import ModelCollpase from "components/model-collapse"
|
import ModelCollapse from "components/model-collapse"
|
||||||
import ModelComponent from "components/model-wrapper"
|
import ModelComponent from "components/model-wrapper"
|
||||||
|
|
||||||
describe("<Models/>", function(){
|
describe("<Models/>", function(){
|
||||||
|
const dummyComponent = () => null
|
||||||
// Given
|
// Given
|
||||||
let components = {
|
let components = {
|
||||||
Collapse: ModelCollpase,
|
Collapse: ModelCollapse,
|
||||||
ModelWrapper: ModelComponent
|
ModelWrapper: ModelComponent,
|
||||||
|
JumpToPath: dummyComponent,
|
||||||
}
|
}
|
||||||
let props = {
|
let props = {
|
||||||
getComponent: (c) => {
|
getComponent: (c) => {
|
||||||
|
|||||||
@@ -8,7 +8,8 @@ describe("<PrimitiveModel/>", function () {
|
|||||||
const dummyComponent = () => null
|
const dummyComponent = () => null
|
||||||
const components = {
|
const components = {
|
||||||
Markdown: dummyComponent,
|
Markdown: dummyComponent,
|
||||||
EnumModel: dummyComponent
|
EnumModel: dummyComponent,
|
||||||
|
Property: dummyComponent,
|
||||||
}
|
}
|
||||||
const props = {
|
const props = {
|
||||||
getComponent: c => components[c],
|
getComponent: c => components[c],
|
||||||
|
|||||||
Reference in New Issue
Block a user