influxdb/ui/test/flux/components/FuncArg.test.tsx

36 lines
671 B
TypeScript
Raw Normal View History

2018-04-17 16:30:50 +00:00
import React from 'react'
import {shallow} from 'enzyme'
2018-06-05 17:40:25 +00:00
import FuncArg from 'src/flux/components/FuncArg'
import {service} from 'test/resources'
2018-04-17 16:30:50 +00:00
const setup = () => {
const props = {
funcID: '',
2018-04-24 16:13:08 +00:00
bodyID: '',
2018-04-18 19:08:43 +00:00
funcName: '',
2018-04-24 20:36:59 +00:00
declarationID: '',
2018-04-17 16:30:50 +00:00
argKey: '',
value: '',
type: '',
service,
2018-04-17 16:30:50 +00:00
onChangeArg: () => {},
onGenerateScript: () => {},
}
const wrapper = shallow(<FuncArg {...props} />)
return {
wrapper,
}
}
2018-06-05 17:40:25 +00:00
describe('Flux.Components.FuncArg', () => {
2018-04-17 16:30:50 +00:00
describe('rendering', () => {
it('renders without errors', () => {
const {wrapper} = setup()
expect(wrapper.exists()).toBe(true)
})
})
})