mirror of
https://github.com/Grasscutters/mitmproxy.git
synced 2024-11-26 02:10:59 +00:00
[web] Minor fixes.
This commit is contained in:
parent
9c90d13149
commit
a0bb64fdd3
@ -4,10 +4,10 @@ import FilterDocs from '../../../components/Header/FilterDocs'
|
|||||||
|
|
||||||
describe('FilterDocs Component', () => {
|
describe('FilterDocs Component', () => {
|
||||||
let mockResponse = { json:
|
let mockResponse = { json:
|
||||||
jest.fn(() => { return { commands: [['cmd1', 'foo'], ['cmd2', 'bar']]}})
|
() => { return { commands: [['cmd1', 'foo'], ['cmd2', 'bar']]}}
|
||||||
},
|
},
|
||||||
promise = Promise.resolve(mockResponse)
|
promise = Promise.resolve(mockResponse)
|
||||||
global.fetch = jest.fn(r => { return promise })
|
global.fetch = r => { return promise }
|
||||||
|
|
||||||
let filterDocs = renderer.create(<FilterDocs/>),
|
let filterDocs = renderer.create(<FilterDocs/>),
|
||||||
tree = filterDocs.toJSON()
|
tree = filterDocs.toJSON()
|
||||||
|
@ -6,7 +6,7 @@ import TestUtil from 'react-dom/test-utils'
|
|||||||
import ReactDOM from 'react-dom'
|
import ReactDOM from 'react-dom'
|
||||||
import { Key } from '../../../utils'
|
import { Key } from '../../../utils'
|
||||||
|
|
||||||
describe('FilterDocs Component', () => {
|
describe('FilterInput Component', () => {
|
||||||
it('should render correctly', () => {
|
it('should render correctly', () => {
|
||||||
let filterInput = renderer.create(<FilterInput type='foo' color='red' placeholder='bar'/>),
|
let filterInput = renderer.create(<FilterInput type='foo' color='red' placeholder='bar'/>),
|
||||||
tree = filterInput.toJSON()
|
tree = filterInput.toJSON()
|
||||||
|
Loading…
Reference in New Issue
Block a user