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

38 lines
764 B
TypeScript

import React from 'react'
import {shallow} from 'enzyme'
import TimeMachine from 'src/flux/components/TimeMachine'
import {service} from 'test/resources'
const setup = () => {
const props = {
script: '',
body: [],
data: [],
service,
suggestions: [],
onSubmitScript: () => {},
onChangeScript: () => {},
onValidate: () => {},
onAppendFrom: () => {},
onAppendJoin: () => {},
onDeleteBody: () => {},
status: {type: '', text: ''},
}
const wrapper = shallow(<TimeMachine {...props} />)
return {
wrapper,
}
}
describe('Flux.Components.TimeMachine', () => {
describe('rendering', () => {
it('renders', () => {
const {wrapper} = setup()
expect(wrapper.exists()).toBe(true)
})
})
})