[web] Minor fixes.

This commit is contained in:
Matthew Shao 2017-05-29 09:15:29 +08:00
parent 9c90d13149
commit a0bb64fdd3
2 changed files with 3 additions and 3 deletions

View File

@ -4,10 +4,10 @@ import FilterDocs from '../../../components/Header/FilterDocs'
describe('FilterDocs Component', () => {
let mockResponse = { json:
jest.fn(() => { return { commands: [['cmd1', 'foo'], ['cmd2', 'bar']]}})
() => { return { commands: [['cmd1', 'foo'], ['cmd2', 'bar']]}}
},
promise = Promise.resolve(mockResponse)
global.fetch = jest.fn(r => { return promise })
global.fetch = r => { return promise }
let filterDocs = renderer.create(<FilterDocs/>),
tree = filterDocs.toJSON()

View File

@ -6,7 +6,7 @@ import TestUtil from 'react-dom/test-utils'
import ReactDOM from 'react-dom'
import { Key } from '../../../utils'
describe('FilterDocs Component', () => {
describe('FilterInput Component', () => {
it('should render correctly', () => {
let filterInput = renderer.create(<FilterInput type='foo' color='red' placeholder='bar'/>),
tree = filterInput.toJSON()