未验证 提交 671e9453 编写于 作者: T Tim Lai 提交者: GitHub

test(jest): cleanup console warnings/errors (#6547)

上级 0a807d62
......@@ -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],
......
Markdown is supported
0% .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册