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